@servicenow/sdk - v4.4.1
    Preparing search index...
    interface Program {
        emit(
            targetSourceFile?: tsc.SourceFile,
            writeFile?: WriteFileCallback,
            cancellationToken?: CancellationToken,
            emitOnlyDtsFiles?: boolean,
            customTransformers?: CustomTransformers,
        ): tsc.EmitResult;
        getCompilerOptions(): tsc.CompilerOptions;
        getConfigFileParsingDiagnostics(): readonly tsc.Diagnostic[];
        getCurrentDirectory(): string;
        getDeclarationDiagnostics(
            sourceFile?: tsc.SourceFile,
            cancellationToken?: CancellationToken,
        ): readonly tsc.DiagnosticWithLocation[];
        getGlobalDiagnostics(
            cancellationToken?: CancellationToken,
        ): readonly tsc.Diagnostic[];
        getIdentifierCount(): number;
        getInstantiationCount(): number;
        getModeForResolutionAtIndex(
            file: tsc.SourceFile,
            index: number,
        ): ResolutionMode;
        getModeForUsageLocation(
            file: tsc.SourceFile,
            usage: tsc.StringLiteralLike,
        ): ResolutionMode;
        getNodeCount(): number;
        getOptionsDiagnostics(
            cancellationToken?: CancellationToken,
        ): readonly tsc.Diagnostic[];
        getProjectReferences(): readonly ProjectReference[] | undefined;
        getRelationCacheSizes(): {
            assignable: number;
            identity: number;
            strictSubtype: number;
            subtype: number;
        };
        getResolvedProjectReferences(): | readonly (
            ResolvedProjectReference
            | undefined
        )[]
        | undefined;
        getRootFileNames(): readonly string[];
        getSemanticDiagnostics(
            sourceFile?: tsc.SourceFile,
            cancellationToken?: CancellationToken,
        ): readonly tsc.Diagnostic[];
        getSourceFile(fileName: string): tsc.SourceFile | undefined;
        getSourceFileByPath(path: tsc.Path): tsc.SourceFile | undefined;
        getSourceFiles(): readonly tsc.SourceFile[];
        getSymbolCount(): number;
        getSyntacticDiagnostics(
            sourceFile?: tsc.SourceFile,
            cancellationToken?: CancellationToken,
        ): readonly tsc.DiagnosticWithLocation[];
        getTypeChecker(): tsc.TypeChecker;
        getTypeCount(): number;
        isSourceFileDefaultLibrary(file: tsc.SourceFile): boolean;
        isSourceFileFromExternalLibrary(file: tsc.SourceFile): boolean;
    }

    Hierarchy (View Summary)

    Index

    Methods

    • Emits the JavaScript and declaration files. If targetSourceFile is not specified, then the JavaScript and declaration files will be produced for all the files in this program. If targetSourceFile is specified, then only the JavaScript and declaration for that specific file will be generated.

      If writeFile is not specified then the writeFile callback from the compiler host will be used for writing the JavaScript and declaration files. Otherwise, the writeFile parameter will be invoked when writing the JavaScript and declaration files.

      Parameters

      Returns tsc.EmitResult

    • Returns readonly tsc.Diagnostic[]

    • Returns string

    • Returns number

    • Returns number

    • Calculates the final resolution mode for an import at some index within a file's imports list. This is the resolution mode explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In --module node16 or nodenext, this may depend on the file's impliedNodeFormat. In --module preserve, it depends only on the input syntax of the reference. In other module modes, when overriding import attributes are not provided, this function returns undefined, as the result would have no impact on module resolution, emit, or type checking.

      Parameters

      Returns ResolutionMode

    • Calculates the final resolution mode for a given module reference node. This is the resolution mode explicitly provided via import attributes, if present, or the syntax the usage would have if emitted to JavaScript. In --module node16 or nodenext, this may depend on the file's impliedNodeFormat. In --module preserve, it depends only on the input syntax of the reference. In other module modes, when overriding import attributes are not provided, this function returns undefined, as the result would have no impact on module resolution, emit, or type checking.

      Parameters

      Returns ResolutionMode

    • Returns number

    • Returns readonly ProjectReference[] | undefined

    • Returns { assignable: number; identity: number; strictSubtype: number; subtype: number }

    • Returns readonly (ResolvedProjectReference | undefined)[] | undefined

    • Get a list of root file names that were passed to a 'createProgram'

      Returns readonly string[]

    • The first time this is called, it will return global diagnostics (no location).

      Parameters

      Returns readonly tsc.Diagnostic[]

    • Get a list of files in the program

      Returns readonly tsc.SourceFile[]

    • Returns number

    • Gets a type checker that can be used to semantically analyze source files in the program.

      Returns tsc.TypeChecker

    • Returns number

    • Parameters

      Returns boolean

    • Parameters

      Returns boolean