mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Make our dts files compile when exactOptionalPropertyTypes is enabled downstream (#56489)
This commit is contained in:
parent
c266e47794
commit
0aa2c48ee3
@ -7403,7 +7403,7 @@ export interface CommandLineOptionBase {
|
||||
isFilePath?: boolean; // True if option value is a path or fileName
|
||||
shortName?: string; // A short mnemonic for convenience - for instance, 'h' can be used in place of 'help'
|
||||
description?: DiagnosticMessage; // The message describing what the command line switch does.
|
||||
defaultValueDescription?: string | number | boolean | DiagnosticMessage; // The message describing what the dafault value is. string type is prepared for fixed chosen like "false" which do not need I18n.
|
||||
defaultValueDescription?: string | number | boolean | DiagnosticMessage | undefined; // The message describing what the dafault value is. string type is prepared for fixed chosen like "false" which do not need I18n.
|
||||
paramType?: DiagnosticMessage; // The name to be used for a non-boolean option's parameter
|
||||
isTSConfigOnly?: boolean; // True if option can only be specified via tsconfig.json file
|
||||
isCommandLineOnly?: boolean;
|
||||
|
||||
@ -347,7 +347,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
readonly realpath?: (path: string) => string;
|
||||
|
||||
/** @internal */
|
||||
hasInvalidatedResolutions: HasInvalidatedResolutions | undefined;
|
||||
hasInvalidatedResolutions?: HasInvalidatedResolutions | undefined;
|
||||
|
||||
/** @internal */
|
||||
hasInvalidatedLibResolutions: HasInvalidatedLibResolutions | undefined;
|
||||
|
||||
@ -340,7 +340,7 @@ export interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalR
|
||||
*/
|
||||
readDirectory?(path: string, extensions?: readonly string[], exclude?: readonly string[], include?: readonly string[], depth?: number): string[];
|
||||
realpath?(path: string): string;
|
||||
/** @internal */ createHash?(data: string): string;
|
||||
/** @internal */ createHash?: ((data: string) => string) | undefined;
|
||||
|
||||
/*
|
||||
* Unlike `realpath and `readDirectory`, `readFile` and `fileExists` are now _required_
|
||||
@ -393,9 +393,9 @@ export interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalR
|
||||
* If provided along with custom resolveLibrary, used to determine if we should redo library resolutions
|
||||
* @internal
|
||||
*/
|
||||
hasInvalidatedLibResolutions?(libFileName: string): boolean;
|
||||
hasInvalidatedLibResolutions?: ((libFileName: string) => boolean) | undefined;
|
||||
|
||||
/** @internal */ hasInvalidatedResolutions?: HasInvalidatedResolutions;
|
||||
/** @internal */ hasInvalidatedResolutions?: HasInvalidatedResolutions | undefined;
|
||||
/** @internal */ hasChangedAutomaticTypeDirectiveNames?: HasChangedAutomaticTypeDirectiveNames;
|
||||
/** @internal */ getGlobalTypingsCacheLocation?(): string | undefined;
|
||||
/** @internal */ getSymlinkCache?(files?: readonly SourceFile[]): SymlinkCache;
|
||||
@ -432,7 +432,7 @@ export interface LanguageServiceHost extends GetEffectiveTypeRootsHost, MinimalR
|
||||
/** @internal */ onReleaseParsedCommandLine?(configFileName: string, oldResolvedRef: ResolvedProjectReference | undefined, optionOptions: CompilerOptions): void;
|
||||
/** @internal */ getIncompleteCompletionsCache?(): IncompleteCompletionsCache;
|
||||
|
||||
jsDocParsingMode?: JSDocParsingMode;
|
||||
jsDocParsingMode?: JSDocParsingMode | undefined;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
|
||||
@ -10420,7 +10420,7 @@ declare namespace ts {
|
||||
installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
|
||||
writeFile?(fileName: string, content: string): void;
|
||||
getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
||||
jsDocParsingMode?: JSDocParsingMode;
|
||||
jsDocParsingMode?: JSDocParsingMode | undefined;
|
||||
}
|
||||
type WithMetadata<T> = T & {
|
||||
metadata?: unknown;
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
// @noImplicitAny: true
|
||||
// @strictNullChecks: true
|
||||
// @lib: es2018
|
||||
// @exactOptionalPropertyTypes: true
|
||||
|
||||
// @filename: node_modules/typescript/package.json
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user