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 d192d8e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/ts-compiler-types.ts
Original file line number Diff line number Diff line change
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,12 +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;
}
}

type a = Omit<{}, 'a'>
/**
* Compiler APIs we use that are marked internal and not included in TypeScript's public API declarations
* @internal
Expand Down

0 comments on commit d192d8e

Please sign in to comment.