fontcolor_theme
package

API @deepkit/type-compiler

npm install @deepkit/type-compiler

런타임 타입 정보를 런타임에서 사용할 수 있도록 하는 TypeScript transformer.

Classes

Cache [source]
export class Cache {
    resolver: ReflectionConfigCache;
    sourceFiles: {
        [fileName: string]: SourceFile;
    };
    globalSourceFiles?: SourceFile[];
    /**
     * Signals the cache to check if it needs to be cleared.
     */
    tick();
}
ReflectionTransformer [source]
export class ReflectionTransformer implements CustomTransformer {
    sourceFile: SourceFile;
    constructor(protected context: TransformationContext, protected cache: Cache = new Cache);
    forHost(host: CompilerHost): this;
    withReflection(config: ReflectionConfig): this;
    transformBundle(node: Bundle): Bundle;
    getTempResultIdentifier(): Identifier;
    transformSourceFile(sourceFile: SourceFile): SourceFile;
    attachAdditionalStatements(statements: NodeArray<Statement> | Statement[]): Statement[];
}
DeclarationTransformer [source]
export class DeclarationTransformer extends ReflectionTransformer {
    transformSourceFile(sourceFile: SourceFile): SourceFile;
}
DeepkitLoader [source]
export class DeepkitLoader {
    constructor();
    transform(source: string, path: string): string;
}

Const

packSizeByte [source]
number
packSize [source]
number

It can't be more ops than this given number

Functions

default [source]
(program: Program, opts: {}): { before: import("typescript").CustomTransformerFactory; afterDeclarations: import("typescript").CustomTransformerFactory; }
encodeOps [source]
(ops: ReflectionOp[]): string
debugPackStruct [source]
(sourceFile: SourceFile, forType: Node, pack: { ops: ReflectionOp[]; stack: PackExpression[]; }): void
transformer [source]
CustomTransformerFactory
declarationTransformer [source]
CustomTransformerFactory
expandBraces [source]
(pattern: string): string[]

Expands brace patterns like {a,b} and {1..3} into a list of patterns.

globToRegExp [source]
(pattern: string, options?: GlobOptions): RegExp

Converts a glob pattern to a regular expression.

Supports *, **, ?, [abc], [!abc], [a-z], {a,b}, {1..3}, and backslash escapes.

isGlobMatch [source]
(path: string, patterns: string | string[], ignore?: string[], options?: GlobOptions): boolean

Returns true if path matches any of the given glob patterns and none of the ignore patterns.

createFilter [source]
(include?: FilterPattern, exclude?: FilterPattern, options?: { resolve?: string | false | null; }): (id: unknown) => boolean

Creates a filter function for file ids, compatible with rollup's createFilter.

A file matches if it matches no exclude and at least one include pattern (or include is empty). Relative glob patterns are resolved against options.resolve (default the current working directory).

Types

FilterPattern [source]
type FilterPattern = ReadonlyArray<string | RegExp> | string | RegExp | null;

Glob pattern, regular expression, or a list of them. Same as rollup's FilterPattern.

GlobOptions [source]
interface GlobOptions {
    /**
     * When true, wildcards also match path segments starting with a dot (e.g. `.git`).
     */
    dot?: boolean;
}

English中文 (Chinese)한국어 (Korean)日本語 (Japanese)Deutsch (German)