@schematics/angular 16.1.0-next.2 → 16.1.0
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/application/schema.js +3 -3
- package/component/schema.js +4 -4
- package/config/schema.js +2 -2
- package/guard/schema.js +2 -2
- package/module/schema.js +2 -2
- package/ng-new/schema.js +4 -4
- package/package.json +3 -3
- package/private/standalone.d.ts +13 -1
- package/private/standalone.js +14 -2
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.d.ts +61 -20
- package/third_party/github.com/Microsoft/TypeScript/lib/typescript.js +28277 -27446
- package/universal/index.js +1 -1
- package/utility/ast-utils.d.ts +16 -6
- package/utility/ast-utils.js +57 -27
- package/utility/dependencies.js +2 -2
- package/utility/dependency.js +4 -4
- package/utility/index.d.ts +1 -0
- package/utility/index.js +16 -1
- package/utility/latest-versions/package.json +3 -3
- package/utility/latest-versions.js +2 -2
- package/utility/standalone/app_config.d.ts +23 -0
- package/utility/standalone/app_config.js +93 -0
- package/utility/standalone/code_block.d.ts +53 -0
- package/utility/standalone/code_block.js +83 -0
- package/utility/standalone/index.d.ts +9 -0
- package/utility/standalone/index.js +14 -0
- package/utility/standalone/rules.d.ts +45 -0
- package/utility/standalone/rules.js +190 -0
- package/utility/standalone/util.d.ts +35 -0
- package/utility/standalone/util.js +134 -0
- package/utility/workspace-models.js +3 -3
- package/workspace/schema.js +2 -2
|
@@ -407,10 +407,8 @@ declare namespace ts {
|
|
|
407
407
|
NotEmittedStatement = 358,
|
|
408
408
|
PartiallyEmittedExpression = 359,
|
|
409
409
|
CommaListExpression = 360,
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
SyntheticReferenceExpression = 363,
|
|
413
|
-
Count = 364,
|
|
410
|
+
SyntheticReferenceExpression = 361,
|
|
411
|
+
Count = 362,
|
|
414
412
|
FirstAssignment = 64,
|
|
415
413
|
LastAssignment = 79,
|
|
416
414
|
FirstCompoundAssignment = 65,
|
|
@@ -552,7 +550,7 @@ declare namespace ts {
|
|
|
552
550
|
interface FlowContainer extends Node {
|
|
553
551
|
_flowContainerBrand: any;
|
|
554
552
|
}
|
|
555
|
-
type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
|
|
553
|
+
type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | SemicolonClassElement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
|
|
556
554
|
type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
|
|
557
555
|
type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
|
|
558
556
|
type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
|
|
@@ -646,7 +644,7 @@ declare namespace ts {
|
|
|
646
644
|
type EntityName = Identifier | QualifiedName;
|
|
647
645
|
type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName | PrivateIdentifier;
|
|
648
646
|
type MemberName = Identifier | PrivateIdentifier;
|
|
649
|
-
type DeclarationName =
|
|
647
|
+
type DeclarationName = PropertyName | JsxAttributeName | StringLiteralLike | ElementAccessExpression | BindingPattern | EntityNameExpression;
|
|
650
648
|
interface Declaration extends Node {
|
|
651
649
|
_declarationBrand: any;
|
|
652
650
|
}
|
|
@@ -831,7 +829,7 @@ declare namespace ts {
|
|
|
831
829
|
readonly body?: FunctionBody | undefined;
|
|
832
830
|
}
|
|
833
831
|
/** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
|
|
834
|
-
interface SemicolonClassElement extends ClassElement {
|
|
832
|
+
interface SemicolonClassElement extends ClassElement, JSDocContainer {
|
|
835
833
|
readonly kind: SyntaxKind.SemicolonClassElement;
|
|
836
834
|
readonly parent: ClassLikeDeclaration;
|
|
837
835
|
}
|
|
@@ -993,7 +991,7 @@ declare namespace ts {
|
|
|
993
991
|
readonly kind: SyntaxKind.StringLiteral;
|
|
994
992
|
}
|
|
995
993
|
type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
|
|
996
|
-
type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral;
|
|
994
|
+
type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral | JsxNamespacedName;
|
|
997
995
|
interface TemplateLiteralTypeNode extends TypeNode {
|
|
998
996
|
kind: SyntaxKind.TemplateLiteralType;
|
|
999
997
|
readonly head: TemplateHead;
|
|
@@ -1352,14 +1350,14 @@ declare namespace ts {
|
|
|
1352
1350
|
type JsxAttributeName = Identifier | JsxNamespacedName;
|
|
1353
1351
|
type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName;
|
|
1354
1352
|
interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
|
|
1355
|
-
readonly expression:
|
|
1353
|
+
readonly expression: Identifier | ThisExpression | JsxTagNamePropertyAccess;
|
|
1356
1354
|
}
|
|
1357
1355
|
interface JsxAttributes extends PrimaryExpression, Declaration {
|
|
1358
1356
|
readonly properties: NodeArray<JsxAttributeLike>;
|
|
1359
1357
|
readonly kind: SyntaxKind.JsxAttributes;
|
|
1360
1358
|
readonly parent: JsxOpeningLikeElement;
|
|
1361
1359
|
}
|
|
1362
|
-
interface JsxNamespacedName extends
|
|
1360
|
+
interface JsxNamespacedName extends Node {
|
|
1363
1361
|
readonly kind: SyntaxKind.JsxNamespacedName;
|
|
1364
1362
|
readonly name: Identifier;
|
|
1365
1363
|
readonly namespace: Identifier;
|
|
@@ -3501,9 +3499,8 @@ declare namespace ts {
|
|
|
3501
3499
|
ReuseTempVariableScope = 1048576,
|
|
3502
3500
|
CustomPrologue = 2097152,
|
|
3503
3501
|
NoHoisting = 4194304,
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
NoAsciiEscaping = 33554432
|
|
3502
|
+
Iterator = 8388608,
|
|
3503
|
+
NoAsciiEscaping = 16777216
|
|
3507
3504
|
}
|
|
3508
3505
|
interface EmitHelperBase {
|
|
3509
3506
|
readonly name: string;
|
|
@@ -4774,6 +4771,26 @@ declare namespace ts {
|
|
|
4774
4771
|
parent: ConstructorDeclaration;
|
|
4775
4772
|
name: Identifier;
|
|
4776
4773
|
};
|
|
4774
|
+
/**
|
|
4775
|
+
* This function checks multiple locations for JSDoc comments that apply to a host node.
|
|
4776
|
+
* At each location, the whole comment may apply to the node, or only a specific tag in
|
|
4777
|
+
* the comment. In the first case, location adds the entire {@link JSDoc} object. In the
|
|
4778
|
+
* second case, it adds the applicable {@link JSDocTag}.
|
|
4779
|
+
*
|
|
4780
|
+
* For example, a JSDoc comment before a parameter adds the entire {@link JSDoc}. But a
|
|
4781
|
+
* `@param` tag on the parent function only adds the {@link JSDocTag} for the `@param`.
|
|
4782
|
+
*
|
|
4783
|
+
* ```ts
|
|
4784
|
+
* /** JSDoc will be returned for `a` *\/
|
|
4785
|
+
* const a = 0
|
|
4786
|
+
* /**
|
|
4787
|
+
* * Entire JSDoc will be returned for `b`
|
|
4788
|
+
* * @param c JSDocTag will be returned for `c`
|
|
4789
|
+
* *\/
|
|
4790
|
+
* function b(/** JSDoc will be returned for `c` *\/ c) {}
|
|
4791
|
+
* ```
|
|
4792
|
+
*/
|
|
4793
|
+
function getJSDocCommentsAndTags(hostNode: Node): readonly (JSDoc | JSDocTag)[];
|
|
4777
4794
|
/** @deprecated */
|
|
4778
4795
|
function createUnparsedSourceFile(text: string): UnparsedSource;
|
|
4779
4796
|
/** @deprecated */
|
|
@@ -5222,7 +5239,7 @@ declare namespace ts {
|
|
|
5222
5239
|
* this list is only the set of defaults that are implicitly included.
|
|
5223
5240
|
*/
|
|
5224
5241
|
function getAutomaticTypeDirectiveNames(options: CompilerOptions, host: ModuleResolutionHost): string[];
|
|
5225
|
-
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions): ModuleResolutionCache;
|
|
5242
|
+
function createModuleResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): ModuleResolutionCache;
|
|
5226
5243
|
function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
|
|
5227
5244
|
function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
|
|
5228
5245
|
function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
|
|
@@ -5876,8 +5893,9 @@ declare namespace ts {
|
|
|
5876
5893
|
type EventBeginInstallTypes = "event::beginInstallTypes";
|
|
5877
5894
|
type EventEndInstallTypes = "event::endInstallTypes";
|
|
5878
5895
|
type EventInitializationFailed = "event::initializationFailed";
|
|
5896
|
+
type ActionWatchTypingLocations = "action::watchTypingLocations";
|
|
5879
5897
|
interface TypingInstallerResponse {
|
|
5880
|
-
readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
|
|
5898
|
+
readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations;
|
|
5881
5899
|
}
|
|
5882
5900
|
interface TypingInstallerRequestWithProjectName {
|
|
5883
5901
|
readonly projectName: string;
|
|
@@ -5886,7 +5904,6 @@ declare namespace ts {
|
|
|
5886
5904
|
readonly fileNames: string[];
|
|
5887
5905
|
readonly projectRootPath: Path;
|
|
5888
5906
|
readonly compilerOptions: CompilerOptions;
|
|
5889
|
-
readonly watchOptions?: WatchOptions;
|
|
5890
5907
|
readonly typeAcquisition: TypeAcquisition;
|
|
5891
5908
|
readonly unresolvedImports: SortedReadonlyArray<string>;
|
|
5892
5909
|
readonly cachePath?: string;
|
|
@@ -5938,8 +5955,6 @@ declare namespace ts {
|
|
|
5938
5955
|
writeFile(path: string, content: string): void;
|
|
5939
5956
|
createDirectory(path: string): void;
|
|
5940
5957
|
getCurrentDirectory?(): string;
|
|
5941
|
-
watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
|
|
5942
|
-
watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
|
|
5943
5958
|
}
|
|
5944
5959
|
interface SetTypings extends ProjectResponse {
|
|
5945
5960
|
readonly typeAcquisition: TypeAcquisition;
|
|
@@ -5948,6 +5963,11 @@ declare namespace ts {
|
|
|
5948
5963
|
readonly unresolvedImports: SortedReadonlyArray<string>;
|
|
5949
5964
|
readonly kind: ActionSet;
|
|
5950
5965
|
}
|
|
5966
|
+
interface WatchTypingLocations extends ProjectResponse {
|
|
5967
|
+
/** if files is undefined, retain same set of watchers */
|
|
5968
|
+
readonly files: readonly string[] | undefined;
|
|
5969
|
+
readonly kind: ActionWatchTypingLocations;
|
|
5970
|
+
}
|
|
5951
5971
|
}
|
|
5952
5972
|
function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
|
|
5953
5973
|
/**
|
|
@@ -6153,6 +6173,8 @@ declare namespace ts {
|
|
|
6153
6173
|
getRenameInfo(fileName: string, position: number, preferences: UserPreferences): RenameInfo;
|
|
6154
6174
|
/** @deprecated Use the signature with `UserPreferences` instead. */
|
|
6155
6175
|
getRenameInfo(fileName: string, position: number, options?: RenameInfoOptions): RenameInfo;
|
|
6176
|
+
findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, preferences: UserPreferences): readonly RenameLocation[] | undefined;
|
|
6177
|
+
/** @deprecated Pass `providePrefixAndSuffixTextForRename` as part of a `UserPreferences` parameter. */
|
|
6156
6178
|
findRenameLocations(fileName: string, position: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename?: boolean): readonly RenameLocation[] | undefined;
|
|
6157
6179
|
getSmartSelectionRange(fileName: string, position: number): SelectionRange;
|
|
6158
6180
|
getDefinitionAtPosition(fileName: string, position: number): readonly DefinitionInfo[] | undefined;
|
|
@@ -6198,8 +6220,18 @@ declare namespace ts {
|
|
|
6198
6220
|
applyCodeActionCommand(fileName: string, action: CodeActionCommand[]): Promise<ApplyCodeActionCommandResult[]>;
|
|
6199
6221
|
/** @deprecated `fileName` will be ignored */
|
|
6200
6222
|
applyCodeActionCommand(fileName: string, action: CodeActionCommand | CodeActionCommand[]): Promise<ApplyCodeActionCommandResult | ApplyCodeActionCommandResult[]>;
|
|
6201
|
-
|
|
6202
|
-
|
|
6223
|
+
/**
|
|
6224
|
+
* @param includeInteractiveActions Include refactor actions that require additional arguments to be
|
|
6225
|
+
* passed when calling `getEditsForRefactor`. When true, clients should inspect the `isInteractive`
|
|
6226
|
+
* property of each returned `RefactorActionInfo` and ensure they are able to collect the appropriate
|
|
6227
|
+
* arguments for any interactive action before offering it.
|
|
6228
|
+
*/
|
|
6229
|
+
getApplicableRefactors(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string, includeInteractiveActions?: boolean): ApplicableRefactorInfo[];
|
|
6230
|
+
getEditsForRefactor(fileName: string, formatOptions: FormatCodeSettings, positionOrRange: number | TextRange, refactorName: string, actionName: string, preferences: UserPreferences | undefined, interactiveRefactorArguments?: InteractiveRefactorArguments): RefactorEditInfo | undefined;
|
|
6231
|
+
getMoveToRefactoringFileSuggestions(fileName: string, positionOrRange: number | TextRange, preferences: UserPreferences | undefined, triggerReason?: RefactorTriggerReason, kind?: string): {
|
|
6232
|
+
newFileName: string;
|
|
6233
|
+
files: string[];
|
|
6234
|
+
};
|
|
6203
6235
|
organizeImports(args: OrganizeImportsArgs, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
|
|
6204
6236
|
getEditsForFileRename(oldFilePath: string, newFilePath: string, formatOptions: FormatCodeSettings, preferences: UserPreferences | undefined): readonly FileTextChanges[];
|
|
6205
6237
|
getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): EmitOutput;
|
|
@@ -6470,6 +6502,11 @@ declare namespace ts {
|
|
|
6470
6502
|
* The hierarchical dotted name of the refactor action.
|
|
6471
6503
|
*/
|
|
6472
6504
|
kind?: string;
|
|
6505
|
+
/**
|
|
6506
|
+
* Indicates that the action requires additional arguments to be passed
|
|
6507
|
+
* when calling `getEditsForRefactor`.
|
|
6508
|
+
*/
|
|
6509
|
+
isInteractive?: boolean;
|
|
6473
6510
|
}
|
|
6474
6511
|
/**
|
|
6475
6512
|
* A set of edits to make in response to a refactor action, plus an optional
|
|
@@ -6480,6 +6517,7 @@ declare namespace ts {
|
|
|
6480
6517
|
renameFilename?: string;
|
|
6481
6518
|
renameLocation?: number;
|
|
6482
6519
|
commands?: CodeActionCommand[];
|
|
6520
|
+
notApplicableReason?: string;
|
|
6483
6521
|
}
|
|
6484
6522
|
type RefactorTriggerReason = "implicit" | "invoked";
|
|
6485
6523
|
interface TextInsertion {
|
|
@@ -6702,6 +6740,9 @@ declare namespace ts {
|
|
|
6702
6740
|
interface DocCommentTemplateOptions {
|
|
6703
6741
|
readonly generateReturnInDocTemplate?: boolean;
|
|
6704
6742
|
}
|
|
6743
|
+
interface InteractiveRefactorArguments {
|
|
6744
|
+
targetFile: string;
|
|
6745
|
+
}
|
|
6705
6746
|
interface SignatureHelpParameter {
|
|
6706
6747
|
name: string;
|
|
6707
6748
|
documentation: SymbolDisplayPart[];
|