Skip to main content
Module

x/tpy/mod.ts>Context

🔑 A strongly typed Pylon API client.
Latest
class Context
import { Context } from "https://deno.land/x/tpy@v1.0.0-RC/mod.ts";

Provides parameter context about the current execution environment to provide error reporting data to generate reports that include said information comprised inside the given Context.

To follow conventions, it is required to pass this as the first argument in functions; Tpy.httpRaw(), along with other functions that are built on top of this follow this instruction.

Usually, this is only used as a type annotation and shouldn't be instantiated directly as this is already done internally given that one is not interacting with internal functions.

Constructors

new
Context(context: Partial<Context>)

Properties

deploymentID: string

A deployment ID.

guildID: string

A guild ID.

key: string

A key within a KV namespace.

kvnamespace: string

A KV namespace title.

Static Properties

nullNumber: string

A null context number.

nullString: string

A null context string.

Static Methods

isNullish(value: string)

Whether the given context matches a nullish context value.