Dagger
Search

typescript-sdk

No long description provided.

Installation

dagger install github.com/dagger/dagger/sdk/typescript/runtime@6efd184405408359352c8ca9e1a0f150592e1fe4

Entrypoint

Return Type
TypescriptSdk !
Arguments
NameTypeDescription
sdkSourceDirDirectory No description provided
Example
dagger -m github.com/dagger/dagger/sdk/typescript/runtime@6efd184405408359352c8ca9e1a0f150592e1fe4 call \
func (m *myModule) example() *TypescriptSdk  {
	return dag.
			TypescriptSdk()
}
@function
def example() -> dag.TypescriptSdk:
	return (
		dag.typescript_sdk()
	)
@func()
example(): TypescriptSdk {
	return dag
		.typescriptSdk()
}

Types

TypescriptSdk 🔗

sdksourceDir() 🔗

Return Type
Directory !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/runtime@6efd184405408359352c8ca9e1a0f150592e1fe4 call \
 sdksource-dir
func (m *myModule) example() *Directory  {
	return dag.
			TypescriptSdk().
			SdksourceDir()
}
@function
def example() -> dagger.Directory:
	return (
		dag.typescript_sdk()
		.sdksource_dir()
	)
@func()
example(): Directory {
	return dag
		.typescriptSdk()
		.sdksourceDir()
}

requiredPaths() 🔗

Return Type
[String ! ] !
Example
dagger -m github.com/dagger/dagger/sdk/typescript/runtime@6efd184405408359352c8ca9e1a0f150592e1fe4 call \
 required-paths
func (m *myModule) example(ctx context.Context) []string  {
	return dag.
			TypescriptSdk().
			RequiredPaths(ctx)
}
@function
async def example() -> List[str]:
	return await (
		dag.typescript_sdk()
		.required_paths()
	)
@func()
async example(): Promise<string[]> {
	return dag
		.typescriptSdk()
		.requiredPaths()
}

moduleRuntime() 🔗

ModuleRuntime returns a container with the node or bun entrypoint ready to be called.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
modSourceModuleSource !-No description provided
introspectionJsonString !-No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(modSource *ModuleSource, introspectionJson string) *Container  {
	return dag.
			TypescriptSdk().
			ModuleRuntime(modSource, introspectionJson)
}
@function
def example(mod_source: dag.ModuleSource, introspection_json: str) -> dagger.Container:
	return (
		dag.typescript_sdk()
		.module_runtime(mod_source, introspection_json)
	)
@func()
example(modSource: ModuleSource, introspectionJson: string): Container {
	return dag
		.typescriptSdk()
		.moduleRuntime(modSource, introspectionJson)
}

codegen() 🔗

Codegen returns the generated API client based on user’s module

Return Type
GeneratedCode !
Arguments
NameTypeDefault ValueDescription
modSourceModuleSource !-No description provided
introspectionJsonString !-No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(modSource *ModuleSource, introspectionJson string) *GeneratedCode  {
	return dag.
			TypescriptSdk().
			Codegen(modSource, introspectionJson)
}
@function
def example(mod_source: dag.ModuleSource, introspection_json: str) -> dag.GeneratedCode:
	return (
		dag.typescript_sdk()
		.codegen(mod_source, introspection_json)
	)
@func()
example(modSource: ModuleSource, introspectionJson: string): GeneratedCode {
	return dag
		.typescriptSdk()
		.codegen(modSource, introspectionJson)
}

codegenBase() 🔗

CodegenBase returns a Container containing the SDK from the engine container and the user’s code with a generated API based on what he did.

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
modSourceModuleSource !-No description provided
introspectionJsonString !-No description provided
Example
echo 'Custom types are not supported in shell examples'
func (m *myModule) example(modSource *ModuleSource, introspectionJson string) *Container  {
	return dag.
			TypescriptSdk().
			CodegenBase(modSource, introspectionJson)
}
@function
def example(mod_source: dag.ModuleSource, introspection_json: str) -> dagger.Container:
	return (
		dag.typescript_sdk()
		.codegen_base(mod_source, introspection_json)
	)
@func()
example(modSource: ModuleSource, introspectionJson: string): Container {
	return dag
		.typescriptSdk()
		.codegenBase(modSource, introspectionJson)
}

base() 🔗

Base returns a Node or Bun container with cache setup for yarn or bun

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
runtimeString !-No description provided
Example
dagger -m github.com/dagger/dagger/sdk/typescript/runtime@6efd184405408359352c8ca9e1a0f150592e1fe4 call \
 base --runtime string
func (m *myModule) example(runtime string) *Container  {
	return dag.
			TypescriptSdk().
			Base(runtime)
}
@function
def example(runtime: str) -> dagger.Container:
	return (
		dag.typescript_sdk()
		.base(runtime)
	)
@func()
example(runtime: string): Container {
	return dag
		.typescriptSdk()
		.base(runtime)
}