Names

FUNCTION

createInterface

@skmtc/lang-typescript 0.19.1

Creates an interface identifier - a type-level entity that declares with interface in block form (export interface Name <heritage+body>) and imports type-only (import { type Foo }), like createType.

Signature

import { createInterface } from '@skmtc/lang-typescript'

createInterface(name: string, args?: CreateDeclarationArgs): TsIdentifier

Parameters

name, string required
args, CreateDeclarationArgs
exported, boolean

Whether the identifier is exported. Defaults to true.

Example
const model = createInterface('Model');
// TsDefinition renders: export interface Model <value>

Returns