@angular/language-service 21.2.0-next.1 → 21.2.0-next.2

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/api.d.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  * @description
11
11
  * Entry point for all public APIs of the language service package.
12
12
  */
13
- import ts from 'typescript';
13
+ import type ts from 'typescript';
14
14
  export interface PluginConfig {
15
15
  /**
16
16
  * If true, return only Angular results. Otherwise, return Angular + TypeScript
@@ -76,12 +76,33 @@ export interface ApplyRefactoringResult extends Omit<ts.RefactorEditInfo, 'notAp
76
76
  errorMessage?: string;
77
77
  warningMessage?: string;
78
78
  }
79
+ /**
80
+ * Result for linked editing ranges containing the ranges and optional word pattern.
81
+ */
82
+ export interface LinkedEditingRanges {
83
+ /** The ranges that should be edited together. */
84
+ ranges: ts.TextSpan[];
85
+ /** An optional word pattern to describe valid tag names. */
86
+ wordPattern?: string;
87
+ }
79
88
  /**
80
89
  * `NgLanguageService` describes an instance of an Angular language service,
81
90
  * whose API surface is a strict superset of TypeScript's language service.
82
91
  */
83
92
  export interface NgLanguageService extends ts.LanguageService {
84
93
  getTcb(fileName: string, position: number): GetTcbResponse | undefined;
94
+ /**
95
+ * Gets linked editing ranges for synchronized editing of HTML tag pairs.
96
+ *
97
+ * When the cursor is on an element tag name, returns both the opening and closing
98
+ * tag name spans so they can be edited simultaneously. This overrides TypeScript's
99
+ * built-in method which only works for JSX/TSX.
100
+ *
101
+ * @param fileName The file to check
102
+ * @param position The cursor position in the file
103
+ * @returns LinkedEditingRanges if on a tag name, undefined otherwise
104
+ */
105
+ getLinkedEditingRangeAtPosition(fileName: string, position: number): LinkedEditingRanges | undefined;
85
106
  getComponentLocationsForTemplate(fileName: string): GetComponentLocationsForTemplateResponse;
86
107
  getTemplateLocationForComponent(fileName: string, position: number): GetTemplateLocationForComponentResponse;
87
108
  getTypescriptLanguageService(): ts.LanguageService;
package/api_bundle.js.map CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["api.ts"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqHO,SAAS,oBACd,IACyB;AACzB,SAAO,YAAY;AACrB;",
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+IO,SAAS,oBACd,IACyB;AACzB,SAAO,YAAY;AACrB;",
5
5
  "names": []
6
6
  }