Skip to content

Commit

Permalink
tricky types
Browse files Browse the repository at this point in the history
  • Loading branch information
cspotcode committed May 17, 2022
1 parent a865be3 commit 293b5cd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/ts-compiler-types.ts
Expand Up @@ -19,7 +19,7 @@ export interface TSCommon {
getPreEmitDiagnostics: typeof _ts.getPreEmitDiagnostics;
flattenDiagnosticMessageText: typeof _ts.flattenDiagnosticMessageText;
transpileModule: typeof _ts.transpileModule;
ModuleKind: typeof _ts.ModuleKind;
ModuleKind: TSCommon.ModuleKindEnum;
ScriptTarget: typeof _ts.ScriptTarget;
findConfigFile: typeof _ts.findConfigFile;
readConfigFile: typeof _ts.readConfigFile;
Expand Down Expand Up @@ -73,10 +73,12 @@ export namespace TSCommon {
_ts.ResolvedModuleWithFailedLookupLocations;
export type FileReference = _ts.FileReference;
export type SourceFile = _ts.SourceFile;
export namespace ModuleKind {
// Hack until we start building against TS >= 4.7.0
export declare const Node16: 100 | undefined;
}
// Hack until we start building against TS >= 4.7.0
export type ModuleKindEnum = typeof _ts.ModuleKind & {
Node16: typeof _ts.ModuleKind extends { Node16: any }
? typeof _ts.ModuleKind['Node16']
: 100;
};
}

/**
Expand Down

0 comments on commit 293b5cd

Please sign in to comment.