Documentation - v0.27.1
    Preparing search index...

    Function generateTypescriptDefinitionsForTlSchema

    • Generate TypeScript definitions for a given TL schema

      Parameters

      • schema: TlFullSchema

        TL schema to generate definitions for

      • Optionalparams: {
            errors?: TlErrors;
            extends?: string;
            extendsSchema?: TlFullSchema;
            layer?: number;
            namespace?: string;
            onlyTypings?: boolean;
            skipLongImport?: boolean;
        }
        • Optionalerrors?: TlErrors

          Errors information object

        • Optionalextends?: string

          Namespace of another schema that this one extends

        • OptionalextendsSchema?: TlFullSchema

          Schema that this one extends

        • Optionallayer?: number

          Layer of the schema

        • Optionalnamespace?: string

          Namespace of the schema

        • OptionalonlyTypings?: boolean

          Whether to only generate typings and don't emit any JS helper functions typings

        • OptionalskipLongImport?: boolean

          Whether to skip importing _Long

      Returns [string, string]

      Tuple containing [ts, js] code