Names
FUNCTION
@skmtc/lang-typescript 0.19.1createNamespace
Creates a namespace identifier - declares with declare namespace in block form (export declare namespace Name <body>) and imports as a plain named import (for Name.Member access). Used for the same-file type re-export blocks the Stainless-style SDK layout emits.
Signature
import { createNamespace } from '@skmtc/lang-typescript'
createNamespace(name: string, args?: CreateDeclarationArgs): TsIdentifierParameters
name, string required
args, CreateDeclarationArgs
exported, boolean
Whether the identifier is exported. Defaults to true.
Example
const models = createNamespace('Models');
// TsDefinition renders: export declare namespace Models <value>