typescript 5.3.0-dev.20230921 → 5.3.0-dev.20230922
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +88 -64
- package/lib/tsserver.js +124 -72
- package/lib/typescript.d.ts +37 -1
- package/lib/typescript.js +125 -74
- package/lib/typingsInstaller.js +45 -35
- package/package.json +2 -2
package/lib/typescript.d.ts
CHANGED
|
@@ -3295,6 +3295,7 @@ declare namespace ts {
|
|
|
3295
3295
|
isNonTsProject(): boolean;
|
|
3296
3296
|
isJsOnlyProject(): boolean;
|
|
3297
3297
|
static resolveModule(moduleName: string, initialDir: string, host: ServerHost, log: (message: string) => void): {} | undefined;
|
|
3298
|
+
readonly jsDocParsingMode: JSDocParsingMode | undefined;
|
|
3298
3299
|
isKnownTypesPackageName(name: string): boolean;
|
|
3299
3300
|
installPackage(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
|
|
3300
3301
|
private get typingsCache();
|
|
@@ -3616,6 +3617,7 @@ declare namespace ts {
|
|
|
3616
3617
|
typesMapLocation?: string;
|
|
3617
3618
|
serverMode?: LanguageServiceMode;
|
|
3618
3619
|
session: Session<unknown> | undefined;
|
|
3620
|
+
jsDocParsingMode?: JSDocParsingMode;
|
|
3619
3621
|
}
|
|
3620
3622
|
interface WatchOptionsAndErrors {
|
|
3621
3623
|
watchOptions: WatchOptions;
|
|
@@ -3690,6 +3692,7 @@ declare namespace ts {
|
|
|
3690
3692
|
private performanceEventHandler?;
|
|
3691
3693
|
private pendingPluginEnablements?;
|
|
3692
3694
|
private currentPluginEnablementPromise?;
|
|
3695
|
+
readonly jsDocParsingMode: JSDocParsingMode | undefined;
|
|
3693
3696
|
constructor(opts: ProjectServiceOptions);
|
|
3694
3697
|
toPath(fileName: string): Path;
|
|
3695
3698
|
private loadTypesMap;
|
|
@@ -7750,6 +7753,7 @@ declare namespace ts {
|
|
|
7750
7753
|
hasInvalidatedResolutions?(filePath: Path): boolean;
|
|
7751
7754
|
createHash?(data: string): string;
|
|
7752
7755
|
getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
|
7756
|
+
jsDocParsingMode?: JSDocParsingMode;
|
|
7753
7757
|
}
|
|
7754
7758
|
interface SourceMapRange extends TextRange {
|
|
7755
7759
|
source?: SourceMapSource;
|
|
@@ -8607,6 +8611,33 @@ declare namespace ts {
|
|
|
8607
8611
|
IndexSignatureParameters = 8848,
|
|
8608
8612
|
JSDocComment = 33,
|
|
8609
8613
|
}
|
|
8614
|
+
enum JSDocParsingMode {
|
|
8615
|
+
/**
|
|
8616
|
+
* Always parse JSDoc comments and include them in the AST.
|
|
8617
|
+
*
|
|
8618
|
+
* This is the default if no mode is provided.
|
|
8619
|
+
*/
|
|
8620
|
+
ParseAll = 0,
|
|
8621
|
+
/**
|
|
8622
|
+
* Never parse JSDoc comments, mo matter the file type.
|
|
8623
|
+
*/
|
|
8624
|
+
ParseNone = 1,
|
|
8625
|
+
/**
|
|
8626
|
+
* Parse only JSDoc comments which are needed to provide correct type errors.
|
|
8627
|
+
*
|
|
8628
|
+
* This will always parse JSDoc in non-TS files, but only parse JSDoc comments
|
|
8629
|
+
* containing `@see` and `@link` in TS files.
|
|
8630
|
+
*/
|
|
8631
|
+
ParseForTypeErrors = 2,
|
|
8632
|
+
/**
|
|
8633
|
+
* Parse only JSDoc comments which are needed to provide correct type info.
|
|
8634
|
+
*
|
|
8635
|
+
* This will always parse JSDoc in non-TS files, but never in TS files.
|
|
8636
|
+
*
|
|
8637
|
+
* Note: Do not use this mode if you require accurate type errors; use {@link ParseForTypeErrors} instead.
|
|
8638
|
+
*/
|
|
8639
|
+
ParseForTypeInfo = 3,
|
|
8640
|
+
}
|
|
8610
8641
|
interface UserPreferences {
|
|
8611
8642
|
readonly disableSuggestions?: boolean;
|
|
8612
8643
|
readonly quotePreference?: "auto" | "double" | "single";
|
|
@@ -8768,6 +8799,8 @@ declare namespace ts {
|
|
|
8768
8799
|
setOnError(onError: ErrorCallback | undefined): void;
|
|
8769
8800
|
setScriptTarget(scriptTarget: ScriptTarget): void;
|
|
8770
8801
|
setLanguageVariant(variant: LanguageVariant): void;
|
|
8802
|
+
setScriptKind(scriptKind: ScriptKind): void;
|
|
8803
|
+
setJSDocParsingMode(kind: JSDocParsingMode): void;
|
|
8771
8804
|
/** @deprecated use {@link resetTokenState} */
|
|
8772
8805
|
setTextPos(textPos: number): void;
|
|
8773
8806
|
resetTokenState(pos: number): void;
|
|
@@ -9437,6 +9470,7 @@ declare namespace ts {
|
|
|
9437
9470
|
* check specified by `isFileProbablyExternalModule` will be used to set the field.
|
|
9438
9471
|
*/
|
|
9439
9472
|
setExternalModuleIndicator?: (file: SourceFile) => void;
|
|
9473
|
+
jsDocParsingMode?: JSDocParsingMode;
|
|
9440
9474
|
}
|
|
9441
9475
|
function parseCommandLine(commandLine: readonly string[], readFile?: (path: string) => string | undefined): ParsedCommandLine;
|
|
9442
9476
|
/**
|
|
@@ -10027,6 +10061,7 @@ declare namespace ts {
|
|
|
10027
10061
|
* Returns the module resolution cache used by a provided `resolveModuleNames` implementation so that any non-name module resolution operations (eg, package.json lookup) can reuse it
|
|
10028
10062
|
*/
|
|
10029
10063
|
getModuleResolutionCache?(): ModuleResolutionCache | undefined;
|
|
10064
|
+
jsDocParsingMode?: JSDocParsingMode;
|
|
10030
10065
|
}
|
|
10031
10066
|
interface WatchCompilerHost<T extends BuilderProgram> extends ProgramHost<T>, WatchHost {
|
|
10032
10067
|
/** Instead of using output d.ts file from project reference, use its source file */
|
|
@@ -10277,6 +10312,7 @@ declare namespace ts {
|
|
|
10277
10312
|
installPackage?(options: InstallPackageOptions): Promise<ApplyCodeActionCommandResult>;
|
|
10278
10313
|
writeFile?(fileName: string, content: string): void;
|
|
10279
10314
|
getParsedCommandLine?(fileName: string): ParsedCommandLine | undefined;
|
|
10315
|
+
jsDocParsingMode?: JSDocParsingMode;
|
|
10280
10316
|
}
|
|
10281
10317
|
type WithMetadata<T> = T & {
|
|
10282
10318
|
metadata?: unknown;
|
|
@@ -11374,7 +11410,7 @@ declare namespace ts {
|
|
|
11374
11410
|
fileName: string;
|
|
11375
11411
|
highlightSpans: HighlightSpan[];
|
|
11376
11412
|
}
|
|
11377
|
-
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string): DocumentRegistry;
|
|
11413
|
+
function createDocumentRegistry(useCaseSensitiveFileNames?: boolean, currentDirectory?: string, jsDocParsingMode?: JSDocParsingMode): DocumentRegistry;
|
|
11378
11414
|
/**
|
|
11379
11415
|
* The document registry represents a store of SourceFile objects that can be shared between
|
|
11380
11416
|
* multiple LanguageService instances. A LanguageService instance holds on the SourceFile (AST)
|