@codingame/monaco-vscode-editor-api 23.1.0 → 23.2.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-editor-api",
3
- "version": "23.1.0",
3
+ "version": "23.2.0",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor - monaco-editor compatible api",
6
6
  "keywords": [],
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@codingame/monaco-vscode-5452e2b7-9081-5f95-839b-4ab3544ce28f-common": "23.1.0",
19
- "@codingame/monaco-vscode-api": "23.1.0"
18
+ "@codingame/monaco-vscode-5452e2b7-9081-5f95-839b-4ab3544ce28f-common": "23.2.0",
19
+ "@codingame/monaco-vscode-api": "23.2.0"
20
20
  },
21
21
  "exports": {
22
22
  ".": "./esm/vs/editor/editor.api.js",
@@ -8251,1026 +8251,3 @@ export namespace worker {
8251
8251
  }
8252
8252
  //dtsv=3
8253
8253
 
8254
- export namespace languages.css {
8255
- export interface CSSFormatConfiguration {
8256
- /** separate selectors with newline (e.g. "a,\nbr" or "a, br"): Default: true */
8257
- newlineBetweenSelectors?: boolean;
8258
- /** add a new line after every css rule: Default: true */
8259
- newlineBetweenRules?: boolean;
8260
- /** ensure space around selector separators: '>', '+', '~' (e.g. "a>b" -> "a > b"): Default: false */
8261
- spaceAroundSelectorSeparator?: boolean;
8262
- /** put braces on the same line as rules (`collapse`), or put braces on own line, Allman / ANSI style (`expand`). Default `collapse` */
8263
- braceStyle?: 'collapse' | 'expand';
8264
- /** whether existing line breaks before elements should be preserved. Default: true */
8265
- preserveNewLines?: boolean;
8266
- /** maximum number of line breaks to be preserved in one chunk. Default: unlimited */
8267
- maxPreserveNewLines?: number;
8268
- }
8269
- export interface Options {
8270
- readonly validate?: boolean;
8271
- readonly lint?: {
8272
- readonly compatibleVendorPrefixes?: 'ignore' | 'warning' | 'error';
8273
- readonly vendorPrefix?: 'ignore' | 'warning' | 'error';
8274
- readonly duplicateProperties?: 'ignore' | 'warning' | 'error';
8275
- readonly emptyRules?: 'ignore' | 'warning' | 'error';
8276
- readonly importStatement?: 'ignore' | 'warning' | 'error';
8277
- readonly boxModel?: 'ignore' | 'warning' | 'error';
8278
- readonly universalSelector?: 'ignore' | 'warning' | 'error';
8279
- readonly zeroUnits?: 'ignore' | 'warning' | 'error';
8280
- readonly fontFaceProperties?: 'ignore' | 'warning' | 'error';
8281
- readonly hexColorLength?: 'ignore' | 'warning' | 'error';
8282
- readonly argumentsInColorFunction?: 'ignore' | 'warning' | 'error';
8283
- readonly unknownProperties?: 'ignore' | 'warning' | 'error';
8284
- readonly ieHack?: 'ignore' | 'warning' | 'error';
8285
- readonly unknownVendorSpecificProperties?: 'ignore' | 'warning' | 'error';
8286
- readonly propertyIgnoredDueToDisplay?: 'ignore' | 'warning' | 'error';
8287
- readonly important?: 'ignore' | 'warning' | 'error';
8288
- readonly float?: 'ignore' | 'warning' | 'error';
8289
- readonly idSelector?: 'ignore' | 'warning' | 'error';
8290
- };
8291
- /**
8292
- * Configures the CSS data types known by the langauge service.
8293
- */
8294
- readonly data?: CSSDataConfiguration;
8295
- /**
8296
- * Settings for the CSS formatter.
8297
- */
8298
- readonly format?: CSSFormatConfiguration;
8299
- }
8300
- export interface ModeConfiguration {
8301
- /**
8302
- * Defines whether the built-in completionItemProvider is enabled.
8303
- */
8304
- readonly completionItems?: boolean;
8305
- /**
8306
- * Defines whether the built-in hoverProvider is enabled.
8307
- */
8308
- readonly hovers?: boolean;
8309
- /**
8310
- * Defines whether the built-in documentSymbolProvider is enabled.
8311
- */
8312
- readonly documentSymbols?: boolean;
8313
- /**
8314
- * Defines whether the built-in definitions provider is enabled.
8315
- */
8316
- readonly definitions?: boolean;
8317
- /**
8318
- * Defines whether the built-in references provider is enabled.
8319
- */
8320
- readonly references?: boolean;
8321
- /**
8322
- * Defines whether the built-in references provider is enabled.
8323
- */
8324
- readonly documentHighlights?: boolean;
8325
- /**
8326
- * Defines whether the built-in rename provider is enabled.
8327
- */
8328
- readonly rename?: boolean;
8329
- /**
8330
- * Defines whether the built-in color provider is enabled.
8331
- */
8332
- readonly colors?: boolean;
8333
- /**
8334
- * Defines whether the built-in foldingRange provider is enabled.
8335
- */
8336
- readonly foldingRanges?: boolean;
8337
- /**
8338
- * Defines whether the built-in diagnostic provider is enabled.
8339
- */
8340
- readonly diagnostics?: boolean;
8341
- /**
8342
- * Defines whether the built-in selection range provider is enabled.
8343
- */
8344
- readonly selectionRanges?: boolean;
8345
- /**
8346
- * Defines whether the built-in document formatting edit provider is enabled.
8347
- */
8348
- readonly documentFormattingEdits?: boolean;
8349
- /**
8350
- * Defines whether the built-in document formatting range edit provider is enabled.
8351
- */
8352
- readonly documentRangeFormattingEdits?: boolean;
8353
- }
8354
- export interface LanguageServiceDefaults {
8355
- readonly languageId: string;
8356
- readonly onDidChange: IEvent<LanguageServiceDefaults>;
8357
- readonly modeConfiguration: ModeConfiguration;
8358
- readonly options: Options;
8359
- setOptions(options: Options): void;
8360
- setModeConfiguration(modeConfiguration: ModeConfiguration): void;
8361
- /** @deprecated Use options instead */
8362
- readonly diagnosticsOptions: DiagnosticsOptions;
8363
- /** @deprecated Use setOptions instead */
8364
- setDiagnosticsOptions(options: DiagnosticsOptions): void;
8365
- }
8366
- /** @deprecated Use Options instead */
8367
- export type DiagnosticsOptions = Options;
8368
- export const cssDefaults: LanguageServiceDefaults;
8369
- export const scssDefaults: LanguageServiceDefaults;
8370
- export const lessDefaults: LanguageServiceDefaults;
8371
- export interface CSSDataConfiguration {
8372
- /**
8373
- * Defines whether the standard CSS properties, at-directives, pseudoClasses and pseudoElements are shown.
8374
- */
8375
- useDefaultDataProvider?: boolean;
8376
- /**
8377
- * Provides a set of custom data providers.
8378
- */
8379
- dataProviders?: {
8380
- [providerId: string]: CSSDataV1;
8381
- };
8382
- }
8383
- /**
8384
- * Custom CSS properties, at-directives, pseudoClasses and pseudoElements
8385
- * https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md
8386
- */
8387
- export interface CSSDataV1 {
8388
- version: 1 | 1.1;
8389
- properties?: IPropertyData[];
8390
- atDirectives?: IAtDirectiveData[];
8391
- pseudoClasses?: IPseudoClassData[];
8392
- pseudoElements?: IPseudoElementData[];
8393
- }
8394
- export type EntryStatus = 'standard' | 'experimental' | 'nonstandard' | 'obsolete';
8395
- export interface IReference {
8396
- name: string;
8397
- url: string;
8398
- }
8399
- export interface IPropertyData {
8400
- name: string;
8401
- description?: string | MarkupContent;
8402
- browsers?: string[];
8403
- restrictions?: string[];
8404
- status?: EntryStatus;
8405
- syntax?: string;
8406
- values?: IValueData[];
8407
- references?: IReference[];
8408
- relevance?: number;
8409
- }
8410
- export interface IAtDirectiveData {
8411
- name: string;
8412
- description?: string | MarkupContent;
8413
- browsers?: string[];
8414
- status?: EntryStatus;
8415
- references?: IReference[];
8416
- }
8417
- export interface IPseudoClassData {
8418
- name: string;
8419
- description?: string | MarkupContent;
8420
- browsers?: string[];
8421
- status?: EntryStatus;
8422
- references?: IReference[];
8423
- }
8424
- export interface IPseudoElementData {
8425
- name: string;
8426
- description?: string | MarkupContent;
8427
- browsers?: string[];
8428
- status?: EntryStatus;
8429
- references?: IReference[];
8430
- }
8431
- export interface IValueData {
8432
- name: string;
8433
- description?: string | MarkupContent;
8434
- browsers?: string[];
8435
- status?: EntryStatus;
8436
- references?: IReference[];
8437
- }
8438
- export interface MarkupContent {
8439
- kind: MarkupKind;
8440
- value: string;
8441
- }
8442
- export type MarkupKind = 'plaintext' | 'markdown';
8443
- }
8444
- export namespace languages.html {
8445
- export interface HTMLFormatConfiguration {
8446
- readonly tabSize: number;
8447
- readonly insertSpaces: boolean;
8448
- readonly wrapLineLength: number;
8449
- readonly unformatted: string;
8450
- readonly contentUnformatted: string;
8451
- readonly indentInnerHtml: boolean;
8452
- readonly preserveNewLines: boolean;
8453
- readonly maxPreserveNewLines: number | undefined;
8454
- readonly indentHandlebars: boolean;
8455
- readonly endWithNewline: boolean;
8456
- readonly extraLiners: string;
8457
- readonly wrapAttributes: 'auto' | 'force' | 'force-aligned' | 'force-expand-multiline';
8458
- }
8459
- export interface CompletionConfiguration {
8460
- readonly [providerId: string]: boolean;
8461
- }
8462
- export interface Options {
8463
- /**
8464
- * Settings for the HTML formatter.
8465
- */
8466
- readonly format?: HTMLFormatConfiguration;
8467
- /**
8468
- * Code completion settings.
8469
- */
8470
- readonly suggest?: CompletionConfiguration;
8471
- /**
8472
- * Configures the HTML data types known by the HTML langauge service.
8473
- */
8474
- readonly data?: HTMLDataConfiguration;
8475
- }
8476
- export interface ModeConfiguration {
8477
- /**
8478
- * Defines whether the built-in completionItemProvider is enabled.
8479
- */
8480
- readonly completionItems?: boolean;
8481
- /**
8482
- * Defines whether the built-in hoverProvider is enabled.
8483
- */
8484
- readonly hovers?: boolean;
8485
- /**
8486
- * Defines whether the built-in documentSymbolProvider is enabled.
8487
- */
8488
- readonly documentSymbols?: boolean;
8489
- /**
8490
- * Defines whether the built-in definitions provider is enabled.
8491
- */
8492
- readonly links?: boolean;
8493
- /**
8494
- * Defines whether the built-in references provider is enabled.
8495
- */
8496
- readonly documentHighlights?: boolean;
8497
- /**
8498
- * Defines whether the built-in rename provider is enabled.
8499
- */
8500
- readonly rename?: boolean;
8501
- /**
8502
- * Defines whether the built-in color provider is enabled.
8503
- */
8504
- readonly colors?: boolean;
8505
- /**
8506
- * Defines whether the built-in foldingRange provider is enabled.
8507
- */
8508
- readonly foldingRanges?: boolean;
8509
- /**
8510
- * Defines whether the built-in diagnostic provider is enabled.
8511
- */
8512
- readonly diagnostics?: boolean;
8513
- /**
8514
- * Defines whether the built-in selection range provider is enabled.
8515
- */
8516
- readonly selectionRanges?: boolean;
8517
- /**
8518
- * Defines whether the built-in documentFormattingEdit provider is enabled.
8519
- */
8520
- readonly documentFormattingEdits?: boolean;
8521
- /**
8522
- * Defines whether the built-in documentRangeFormattingEdit provider is enabled.
8523
- */
8524
- readonly documentRangeFormattingEdits?: boolean;
8525
- }
8526
- export interface LanguageServiceDefaults {
8527
- readonly languageId: string;
8528
- readonly modeConfiguration: ModeConfiguration;
8529
- readonly onDidChange: IEvent<LanguageServiceDefaults>;
8530
- readonly options: Options;
8531
- setOptions(options: Options): void;
8532
- setModeConfiguration(modeConfiguration: ModeConfiguration): void;
8533
- }
8534
- export const htmlLanguageService: LanguageServiceRegistration;
8535
- export const htmlDefaults: LanguageServiceDefaults;
8536
- export const handlebarLanguageService: LanguageServiceRegistration;
8537
- export const handlebarDefaults: LanguageServiceDefaults;
8538
- export const razorLanguageService: LanguageServiceRegistration;
8539
- export const razorDefaults: LanguageServiceDefaults;
8540
- export interface LanguageServiceRegistration extends IDisposable {
8541
- readonly defaults: LanguageServiceDefaults;
8542
- }
8543
- /**
8544
- * Registers a new HTML language service for the languageId.
8545
- * Note: 'html', 'handlebar' and 'razor' are registered by default.
8546
- *
8547
- * Use this method to register additional language ids with a HTML service.
8548
- * The language server has to be registered before an editor model is opened.
8549
- */
8550
- export function registerHTMLLanguageService(languageId: string, options?: Options, modeConfiguration?: ModeConfiguration): LanguageServiceRegistration;
8551
- export interface HTMLDataConfiguration {
8552
- /**
8553
- * Defines whether the standard HTML tags and attributes are shown
8554
- */
8555
- readonly useDefaultDataProvider?: boolean;
8556
- /**
8557
- * Provides a set of custom data providers.
8558
- */
8559
- readonly dataProviders?: {
8560
- [providerId: string]: HTMLDataV1;
8561
- };
8562
- }
8563
- /**
8564
- * Custom HTML tags attributes and attribute values
8565
- * https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md
8566
- */
8567
- export interface HTMLDataV1 {
8568
- readonly version: 1 | 1.1;
8569
- readonly tags?: ITagData[];
8570
- readonly globalAttributes?: IAttributeData[];
8571
- readonly valueSets?: IValueSet[];
8572
- }
8573
- export interface IReference {
8574
- readonly name: string;
8575
- readonly url: string;
8576
- }
8577
- export interface ITagData {
8578
- readonly name: string;
8579
- readonly description?: string | MarkupContent;
8580
- readonly attributes: IAttributeData[];
8581
- readonly references?: IReference[];
8582
- }
8583
- export interface IAttributeData {
8584
- readonly name: string;
8585
- readonly description?: string | MarkupContent;
8586
- readonly valueSet?: string;
8587
- readonly values?: IValueData[];
8588
- readonly references?: IReference[];
8589
- }
8590
- export interface IValueData {
8591
- readonly name: string;
8592
- readonly description?: string | MarkupContent;
8593
- readonly references?: IReference[];
8594
- }
8595
- export interface IValueSet {
8596
- readonly name: string;
8597
- readonly values: IValueData[];
8598
- }
8599
- export interface MarkupContent {
8600
- readonly kind: MarkupKind;
8601
- readonly value: string;
8602
- }
8603
- export type MarkupKind = 'plaintext' | 'markdown';
8604
- }
8605
- export namespace languages.json {
8606
- export interface BaseASTNode {
8607
- readonly type: 'object' | 'array' | 'property' | 'string' | 'number' | 'boolean' | 'null';
8608
- readonly parent?: ASTNode;
8609
- readonly offset: number;
8610
- readonly length: number;
8611
- readonly children?: ASTNode[];
8612
- readonly value?: string | boolean | number | null;
8613
- }
8614
- export interface ObjectASTNode extends BaseASTNode {
8615
- readonly type: 'object';
8616
- readonly properties: PropertyASTNode[];
8617
- readonly children: ASTNode[];
8618
- }
8619
- export interface PropertyASTNode extends BaseASTNode {
8620
- readonly type: 'property';
8621
- readonly keyNode: StringASTNode;
8622
- readonly valueNode?: ASTNode;
8623
- readonly colonOffset?: number;
8624
- readonly children: ASTNode[];
8625
- }
8626
- export interface ArrayASTNode extends BaseASTNode {
8627
- readonly type: 'array';
8628
- readonly items: ASTNode[];
8629
- readonly children: ASTNode[];
8630
- }
8631
- export interface StringASTNode extends BaseASTNode {
8632
- readonly type: 'string';
8633
- readonly value: string;
8634
- }
8635
- export interface NumberASTNode extends BaseASTNode {
8636
- readonly type: 'number';
8637
- readonly value: number;
8638
- readonly isInteger: boolean;
8639
- }
8640
- export interface BooleanASTNode extends BaseASTNode {
8641
- readonly type: 'boolean';
8642
- readonly value: boolean;
8643
- }
8644
- export interface NullASTNode extends BaseASTNode {
8645
- readonly type: 'null';
8646
- readonly value: null;
8647
- }
8648
- export type ASTNode = ObjectASTNode | PropertyASTNode | ArrayASTNode | StringASTNode | NumberASTNode | BooleanASTNode | NullASTNode;
8649
- export type JSONDocument = {
8650
- root: ASTNode | undefined;
8651
- getNodeFromOffset(offset: number, includeRightBound?: boolean): ASTNode | undefined;
8652
- };
8653
- export type JSONSchemaRef = JSONSchema | boolean;
8654
- export interface JSONSchemaMap {
8655
- [name: string]: JSONSchemaRef;
8656
- }
8657
- export interface JSONSchema {
8658
- id?: string;
8659
- $id?: string;
8660
- $schema?: string;
8661
- type?: string | string[];
8662
- title?: string;
8663
- default?: any;
8664
- definitions?: {
8665
- [name: string]: JSONSchema;
8666
- };
8667
- description?: string;
8668
- properties?: JSONSchemaMap;
8669
- patternProperties?: JSONSchemaMap;
8670
- additionalProperties?: boolean | JSONSchemaRef;
8671
- minProperties?: number;
8672
- maxProperties?: number;
8673
- dependencies?: JSONSchemaMap | {
8674
- [prop: string]: string[];
8675
- };
8676
- items?: JSONSchemaRef | JSONSchemaRef[];
8677
- minItems?: number;
8678
- maxItems?: number;
8679
- uniqueItems?: boolean;
8680
- additionalItems?: boolean | JSONSchemaRef;
8681
- pattern?: string;
8682
- minLength?: number;
8683
- maxLength?: number;
8684
- minimum?: number;
8685
- maximum?: number;
8686
- exclusiveMinimum?: boolean | number;
8687
- exclusiveMaximum?: boolean | number;
8688
- multipleOf?: number;
8689
- required?: string[];
8690
- $ref?: string;
8691
- anyOf?: JSONSchemaRef[];
8692
- allOf?: JSONSchemaRef[];
8693
- oneOf?: JSONSchemaRef[];
8694
- not?: JSONSchemaRef;
8695
- enum?: any[];
8696
- format?: string;
8697
- const?: any;
8698
- contains?: JSONSchemaRef;
8699
- propertyNames?: JSONSchemaRef;
8700
- examples?: any[];
8701
- $comment?: string;
8702
- if?: JSONSchemaRef;
8703
- then?: JSONSchemaRef;
8704
- else?: JSONSchemaRef;
8705
- defaultSnippets?: {
8706
- label?: string;
8707
- description?: string;
8708
- markdownDescription?: string;
8709
- body?: any;
8710
- bodyText?: string;
8711
- }[];
8712
- errorMessage?: string;
8713
- patternErrorMessage?: string;
8714
- deprecationMessage?: string;
8715
- enumDescriptions?: string[];
8716
- markdownEnumDescriptions?: string[];
8717
- markdownDescription?: string;
8718
- doNotSuggest?: boolean;
8719
- suggestSortText?: string;
8720
- allowComments?: boolean;
8721
- allowTrailingCommas?: boolean;
8722
- }
8723
- export interface MatchingSchema {
8724
- node: ASTNode;
8725
- schema: JSONSchema;
8726
- }
8727
- export interface DiagnosticsOptions {
8728
- /**
8729
- * If set, the validator will be enabled and perform syntax and schema based validation,
8730
- * unless `DiagnosticsOptions.schemaValidation` is set to `ignore`.
8731
- */
8732
- readonly validate?: boolean;
8733
- /**
8734
- * If set, comments are tolerated. If set to false, syntax errors will be emitted for comments.
8735
- * `DiagnosticsOptions.allowComments` will override this setting.
8736
- */
8737
- readonly allowComments?: boolean;
8738
- /**
8739
- * A list of known schemas and/or associations of schemas to file names.
8740
- */
8741
- readonly schemas?: {
8742
- /**
8743
- * The URI of the schema, which is also the identifier of the schema.
8744
- */
8745
- readonly uri: string;
8746
- /**
8747
- * A list of glob patterns that describe for which file URIs the JSON schema will be used.
8748
- * '*' and '**' wildcards are supported. Exclusion patterns start with '!'.
8749
- * For example '*.schema.json', 'package.json', '!foo*.schema.json', 'foo/**\/BADRESP.json'.
8750
- * A match succeeds when there is at least one pattern matching and last matching pattern does not start with '!'.
8751
- */
8752
- readonly fileMatch?: string[];
8753
- /**
8754
- * The schema for the given URI.
8755
- */
8756
- readonly schema?: any;
8757
- }[];
8758
- /**
8759
- * If set, the schema service would load schema content on-demand with 'fetch' if available
8760
- */
8761
- readonly enableSchemaRequest?: boolean;
8762
- /**
8763
- * The severity of problems from schema validation. If set to 'ignore', schema validation will be skipped. If not set, 'warning' is used.
8764
- */
8765
- readonly schemaValidation?: SeverityLevel;
8766
- /**
8767
- * The severity of problems that occurred when resolving and loading schemas. If set to 'ignore', schema resolving problems are not reported. If not set, 'warning' is used.
8768
- */
8769
- readonly schemaRequest?: SeverityLevel;
8770
- /**
8771
- * The severity of reported trailing commas. If not set, trailing commas will be reported as errors.
8772
- */
8773
- readonly trailingCommas?: SeverityLevel;
8774
- /**
8775
- * The severity of reported comments. If not set, 'DiagnosticsOptions.allowComments' defines whether comments are ignored or reported as errors.
8776
- */
8777
- readonly comments?: SeverityLevel;
8778
- }
8779
- export type SeverityLevel = 'error' | 'warning' | 'ignore';
8780
- export interface ModeConfiguration {
8781
- /**
8782
- * Defines whether the built-in documentFormattingEdit provider is enabled.
8783
- */
8784
- readonly documentFormattingEdits?: boolean;
8785
- /**
8786
- * Defines whether the built-in documentRangeFormattingEdit provider is enabled.
8787
- */
8788
- readonly documentRangeFormattingEdits?: boolean;
8789
- /**
8790
- * Defines whether the built-in completionItemProvider is enabled.
8791
- */
8792
- readonly completionItems?: boolean;
8793
- /**
8794
- * Defines whether the built-in hoverProvider is enabled.
8795
- */
8796
- readonly hovers?: boolean;
8797
- /**
8798
- * Defines whether the built-in documentSymbolProvider is enabled.
8799
- */
8800
- readonly documentSymbols?: boolean;
8801
- /**
8802
- * Defines whether the built-in tokens provider is enabled.
8803
- */
8804
- readonly tokens?: boolean;
8805
- /**
8806
- * Defines whether the built-in color provider is enabled.
8807
- */
8808
- readonly colors?: boolean;
8809
- /**
8810
- * Defines whether the built-in foldingRange provider is enabled.
8811
- */
8812
- readonly foldingRanges?: boolean;
8813
- /**
8814
- * Defines whether the built-in diagnostic provider is enabled.
8815
- */
8816
- readonly diagnostics?: boolean;
8817
- /**
8818
- * Defines whether the built-in selection range provider is enabled.
8819
- */
8820
- readonly selectionRanges?: boolean;
8821
- }
8822
- export interface LanguageServiceDefaults {
8823
- readonly languageId: string;
8824
- readonly onDidChange: IEvent<LanguageServiceDefaults>;
8825
- readonly diagnosticsOptions: DiagnosticsOptions;
8826
- readonly modeConfiguration: ModeConfiguration;
8827
- setDiagnosticsOptions(options: DiagnosticsOptions): void;
8828
- setModeConfiguration(modeConfiguration: ModeConfiguration): void;
8829
- }
8830
- export const jsonDefaults: LanguageServiceDefaults;
8831
- export interface IJSONWorker {
8832
- parseJSONDocument(uri: string): Promise<JSONDocument | null>;
8833
- getMatchingSchemas(uri: string): Promise<MatchingSchema[]>;
8834
- }
8835
- export const getWorker: () => Promise<(...uris: Uri[]) => Promise<IJSONWorker>>;
8836
- }
8837
- export namespace languages.typescript {
8838
- export enum ModuleKind {
8839
- None = 0,
8840
- CommonJS = 1,
8841
- AMD = 2,
8842
- UMD = 3,
8843
- System = 4,
8844
- ES2015 = 5,
8845
- ESNext = 99
8846
- }
8847
- export enum JsxEmit {
8848
- None = 0,
8849
- Preserve = 1,
8850
- React = 2,
8851
- ReactNative = 3,
8852
- ReactJSX = 4,
8853
- ReactJSXDev = 5
8854
- }
8855
- export enum NewLineKind {
8856
- CarriageReturnLineFeed = 0,
8857
- LineFeed = 1
8858
- }
8859
- export enum ScriptTarget {
8860
- ES3 = 0,
8861
- ES5 = 1,
8862
- ES2015 = 2,
8863
- ES2016 = 3,
8864
- ES2017 = 4,
8865
- ES2018 = 5,
8866
- ES2019 = 6,
8867
- ES2020 = 7,
8868
- ESNext = 99,
8869
- JSON = 100,
8870
- Latest = 99
8871
- }
8872
- export enum ModuleResolutionKind {
8873
- Classic = 1,
8874
- NodeJs = 2
8875
- }
8876
- interface MapLike<T> {
8877
- [index: string]: T;
8878
- }
8879
- type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | null | undefined;
8880
- interface CompilerOptions {
8881
- allowJs?: boolean;
8882
- allowSyntheticDefaultImports?: boolean;
8883
- allowUmdGlobalAccess?: boolean;
8884
- allowUnreachableCode?: boolean;
8885
- allowUnusedLabels?: boolean;
8886
- alwaysStrict?: boolean;
8887
- baseUrl?: string;
8888
- charset?: string;
8889
- checkJs?: boolean;
8890
- declaration?: boolean;
8891
- declarationMap?: boolean;
8892
- emitDeclarationOnly?: boolean;
8893
- declarationDir?: string;
8894
- disableSizeLimit?: boolean;
8895
- disableSourceOfProjectReferenceRedirect?: boolean;
8896
- downlevelIteration?: boolean;
8897
- emitBOM?: boolean;
8898
- emitDecoratorMetadata?: boolean;
8899
- experimentalDecorators?: boolean;
8900
- forceConsistentCasingInFileNames?: boolean;
8901
- importHelpers?: boolean;
8902
- inlineSourceMap?: boolean;
8903
- inlineSources?: boolean;
8904
- isolatedModules?: boolean;
8905
- jsx?: JsxEmit;
8906
- keyofStringsOnly?: boolean;
8907
- lib?: string[];
8908
- locale?: string;
8909
- mapRoot?: string;
8910
- maxNodeModuleJsDepth?: number;
8911
- module?: ModuleKind;
8912
- moduleResolution?: ModuleResolutionKind;
8913
- newLine?: NewLineKind;
8914
- noEmit?: boolean;
8915
- noEmitHelpers?: boolean;
8916
- noEmitOnError?: boolean;
8917
- noErrorTruncation?: boolean;
8918
- noFallthroughCasesInSwitch?: boolean;
8919
- noImplicitAny?: boolean;
8920
- noImplicitReturns?: boolean;
8921
- noImplicitThis?: boolean;
8922
- noStrictGenericChecks?: boolean;
8923
- noUnusedLocals?: boolean;
8924
- noUnusedParameters?: boolean;
8925
- noImplicitUseStrict?: boolean;
8926
- noLib?: boolean;
8927
- noResolve?: boolean;
8928
- out?: string;
8929
- outDir?: string;
8930
- outFile?: string;
8931
- paths?: MapLike<string[]>;
8932
- preserveConstEnums?: boolean;
8933
- preserveSymlinks?: boolean;
8934
- project?: string;
8935
- reactNamespace?: string;
8936
- jsxFactory?: string;
8937
- composite?: boolean;
8938
- removeComments?: boolean;
8939
- rootDir?: string;
8940
- rootDirs?: string[];
8941
- skipLibCheck?: boolean;
8942
- skipDefaultLibCheck?: boolean;
8943
- sourceMap?: boolean;
8944
- sourceRoot?: string;
8945
- strict?: boolean;
8946
- strictFunctionTypes?: boolean;
8947
- strictBindCallApply?: boolean;
8948
- strictNullChecks?: boolean;
8949
- strictPropertyInitialization?: boolean;
8950
- stripInternal?: boolean;
8951
- suppressExcessPropertyErrors?: boolean;
8952
- suppressImplicitAnyIndexErrors?: boolean;
8953
- target?: ScriptTarget;
8954
- traceResolution?: boolean;
8955
- resolveJsonModule?: boolean;
8956
- types?: string[];
8957
- /** Paths used to compute primary types search locations */
8958
- typeRoots?: string[];
8959
- esModuleInterop?: boolean;
8960
- useDefineForClassFields?: boolean;
8961
- [option: string]: CompilerOptionsValue | undefined;
8962
- }
8963
- export interface DiagnosticsOptions {
8964
- noSemanticValidation?: boolean;
8965
- noSyntaxValidation?: boolean;
8966
- noSuggestionDiagnostics?: boolean;
8967
- /**
8968
- * Limit diagnostic computation to only visible files.
8969
- * Defaults to false.
8970
- */
8971
- onlyVisible?: boolean;
8972
- diagnosticCodesToIgnore?: number[];
8973
- }
8974
- export interface WorkerOptions {
8975
- /** A full HTTP path to a JavaScript file which adds a function `customTSWorkerFactory` to the self inside a web-worker */
8976
- customWorkerPath?: string;
8977
- }
8978
- interface InlayHintsOptions {
8979
- readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all';
8980
- readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean;
8981
- readonly includeInlayFunctionParameterTypeHints?: boolean;
8982
- readonly includeInlayVariableTypeHints?: boolean;
8983
- readonly includeInlayPropertyDeclarationTypeHints?: boolean;
8984
- readonly includeInlayFunctionLikeReturnTypeHints?: boolean;
8985
- readonly includeInlayEnumMemberValueHints?: boolean;
8986
- }
8987
- interface IExtraLib {
8988
- content: string;
8989
- version: number;
8990
- }
8991
- export interface IExtraLibs {
8992
- [path: string]: IExtraLib;
8993
- }
8994
- /**
8995
- * A linked list of formatted diagnostic messages to be used as part of a multiline message.
8996
- * It is built from the bottom up, leaving the head to be the "main" diagnostic.
8997
- */
8998
- interface DiagnosticMessageChain {
8999
- messageText: string;
9000
- /** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
9001
- category: 0 | 1 | 2 | 3;
9002
- code: number;
9003
- next?: DiagnosticMessageChain[];
9004
- }
9005
- export interface Diagnostic extends DiagnosticRelatedInformation {
9006
- /** May store more in future. For now, this will simply be `true` to indicate when a diagnostic is an unused-identifier diagnostic. */
9007
- reportsUnnecessary?: {};
9008
- reportsDeprecated?: {};
9009
- source?: string;
9010
- relatedInformation?: DiagnosticRelatedInformation[];
9011
- }
9012
- export interface DiagnosticRelatedInformation {
9013
- /** Diagnostic category: warning = 0, error = 1, suggestion = 2, message = 3 */
9014
- category: 0 | 1 | 2 | 3;
9015
- code: number;
9016
- /** TypeScriptWorker removes all but the `fileName` property to avoid serializing circular JSON structures. */
9017
- file: {
9018
- fileName: string;
9019
- } | undefined;
9020
- start: number | undefined;
9021
- length: number | undefined;
9022
- messageText: string | DiagnosticMessageChain;
9023
- }
9024
- export interface EmitOutput {
9025
- outputFiles: OutputFile[];
9026
- emitSkipped: boolean;
9027
- diagnostics?: Diagnostic[];
9028
- }
9029
- interface OutputFile {
9030
- name: string;
9031
- writeByteOrderMark: boolean;
9032
- text: string;
9033
- }
9034
- export interface ModeConfiguration {
9035
- /**
9036
- * Defines whether the built-in completionItemProvider is enabled.
9037
- */
9038
- readonly completionItems?: boolean;
9039
- /**
9040
- * Defines whether the built-in hoverProvider is enabled.
9041
- */
9042
- readonly hovers?: boolean;
9043
- /**
9044
- * Defines whether the built-in documentSymbolProvider is enabled.
9045
- */
9046
- readonly documentSymbols?: boolean;
9047
- /**
9048
- * Defines whether the built-in definitions provider is enabled.
9049
- */
9050
- readonly definitions?: boolean;
9051
- /**
9052
- * Defines whether the built-in references provider is enabled.
9053
- */
9054
- readonly references?: boolean;
9055
- /**
9056
- * Defines whether the built-in references provider is enabled.
9057
- */
9058
- readonly documentHighlights?: boolean;
9059
- /**
9060
- * Defines whether the built-in rename provider is enabled.
9061
- */
9062
- readonly rename?: boolean;
9063
- /**
9064
- * Defines whether the built-in diagnostic provider is enabled.
9065
- */
9066
- readonly diagnostics?: boolean;
9067
- /**
9068
- * Defines whether the built-in document formatting range edit provider is enabled.
9069
- */
9070
- readonly documentRangeFormattingEdits?: boolean;
9071
- /**
9072
- * Defines whether the built-in signature help provider is enabled.
9073
- */
9074
- readonly signatureHelp?: boolean;
9075
- /**
9076
- * Defines whether the built-in onType formatting edit provider is enabled.
9077
- */
9078
- readonly onTypeFormattingEdits?: boolean;
9079
- /**
9080
- * Defines whether the built-in code actions provider is enabled.
9081
- */
9082
- readonly codeActions?: boolean;
9083
- /**
9084
- * Defines whether the built-in inlay hints provider is enabled.
9085
- */
9086
- readonly inlayHints?: boolean;
9087
- }
9088
- export interface LanguageServiceDefaults {
9089
- /**
9090
- * Event fired when compiler options or diagnostics options are changed.
9091
- */
9092
- readonly onDidChange: IEvent<void>;
9093
- /**
9094
- * Event fired when extra libraries registered with the language service change.
9095
- */
9096
- readonly onDidExtraLibsChange: IEvent<void>;
9097
- readonly workerOptions: WorkerOptions;
9098
- readonly inlayHintsOptions: InlayHintsOptions;
9099
- readonly modeConfiguration: ModeConfiguration;
9100
- setModeConfiguration(modeConfiguration: ModeConfiguration): void;
9101
- /**
9102
- * Get the current extra libs registered with the language service.
9103
- */
9104
- getExtraLibs(): IExtraLibs;
9105
- /**
9106
- * Add an additional source file to the language service. Use this
9107
- * for typescript (definition) files that won't be loaded as editor
9108
- * documents, like `jquery.d.ts`.
9109
- *
9110
- * @param content The file content
9111
- * @param filePath An optional file path
9112
- * @returns A disposable which will remove the file from the
9113
- * language service upon disposal.
9114
- */
9115
- addExtraLib(content: string, filePath?: string): IDisposable;
9116
- /**
9117
- * Remove all existing extra libs and set the additional source
9118
- * files to the language service. Use this for typescript definition
9119
- * files that won't be loaded as editor documents, like `jquery.d.ts`.
9120
- * @param libs An array of entries to register.
9121
- */
9122
- setExtraLibs(libs: {
9123
- content: string;
9124
- filePath?: string;
9125
- }[]): void;
9126
- /**
9127
- * Get current TypeScript compiler options for the language service.
9128
- */
9129
- getCompilerOptions(): CompilerOptions;
9130
- /**
9131
- * Set TypeScript compiler options.
9132
- */
9133
- setCompilerOptions(options: CompilerOptions): void;
9134
- /**
9135
- * Get the current diagnostics options for the language service.
9136
- */
9137
- getDiagnosticsOptions(): DiagnosticsOptions;
9138
- /**
9139
- * Configure whether syntactic and/or semantic validation should
9140
- * be performed
9141
- */
9142
- setDiagnosticsOptions(options: DiagnosticsOptions): void;
9143
- /**
9144
- * Configure webworker options
9145
- */
9146
- setWorkerOptions(options: WorkerOptions): void;
9147
- /**
9148
- * No-op.
9149
- */
9150
- setMaximumWorkerIdleTime(value: number): void;
9151
- /**
9152
- * Configure if all existing models should be eagerly sync'd
9153
- * to the worker on start or restart.
9154
- */
9155
- setEagerModelSync(value: boolean): void;
9156
- /**
9157
- * Get the current setting for whether all existing models should be eagerly sync'd
9158
- * to the worker on start or restart.
9159
- */
9160
- getEagerModelSync(): boolean;
9161
- /**
9162
- * Configure inlay hints options.
9163
- */
9164
- setInlayHintsOptions(options: InlayHintsOptions): void;
9165
- }
9166
- export interface TypeScriptWorker {
9167
- /**
9168
- * Get diagnostic messages for any syntax issues in the given file.
9169
- */
9170
- getSyntacticDiagnostics(fileName: string): Promise<Diagnostic[]>;
9171
- /**
9172
- * Get diagnostic messages for any semantic issues in the given file.
9173
- */
9174
- getSemanticDiagnostics(fileName: string): Promise<Diagnostic[]>;
9175
- /**
9176
- * Get diagnostic messages for any suggestions related to the given file.
9177
- */
9178
- getSuggestionDiagnostics(fileName: string): Promise<Diagnostic[]>;
9179
- /**
9180
- * Get the content of a given file.
9181
- */
9182
- getScriptText(fileName: string): Promise<string | undefined>;
9183
- /**
9184
- * Get diagnostic messages related to the current compiler options.
9185
- * @param fileName Not used
9186
- */
9187
- getCompilerOptionsDiagnostics(fileName: string): Promise<Diagnostic[]>;
9188
- /**
9189
- * Get code completions for the given file and position.
9190
- * @returns `Promise<typescript.CompletionInfo | undefined>`
9191
- */
9192
- getCompletionsAtPosition(fileName: string, position: number): Promise<any | undefined>;
9193
- /**
9194
- * Get code completion details for the given file, position, and entry.
9195
- * @returns `Promise<typescript.CompletionEntryDetails | undefined>`
9196
- */
9197
- getCompletionEntryDetails(fileName: string, position: number, entry: string): Promise<any | undefined>;
9198
- /**
9199
- * Get signature help items for the item at the given file and position.
9200
- * @returns `Promise<typescript.SignatureHelpItems | undefined>`
9201
- */
9202
- getSignatureHelpItems(fileName: string, position: number, options: any): Promise<any | undefined>;
9203
- /**
9204
- * Get quick info for the item at the given position in the file.
9205
- * @returns `Promise<typescript.QuickInfo | undefined>`
9206
- */
9207
- getQuickInfoAtPosition(fileName: string, position: number): Promise<any | undefined>;
9208
- getDocumentHighlights(fileName: string, position: number, filesToSearch: string[]): Promise<ReadonlyArray<any> | undefined>;
9209
- /**
9210
- * Get the definition of the item at the given position in the file.
9211
- * @returns `Promise<ReadonlyArray<typescript.DefinitionInfo> | undefined>`
9212
- */
9213
- getDefinitionAtPosition(fileName: string, position: number): Promise<ReadonlyArray<any> | undefined>;
9214
- /**
9215
- * Get references to the item at the given position in the file.
9216
- * @returns `Promise<typescript.ReferenceEntry[] | undefined>`
9217
- */
9218
- getReferencesAtPosition(fileName: string, position: number): Promise<any[] | undefined>;
9219
- /**
9220
- * Get outline entries for the item at the given position in the file.
9221
- * @returns `Promise<typescript.NavigationTree | undefined>`
9222
- */
9223
- getNavigationTree(fileName: string): Promise<any | undefined>;
9224
- /**
9225
- * Get changes which should be applied to format the given file.
9226
- * @param options `typescript.FormatCodeOptions`
9227
- * @returns `Promise<typescript.TextChange[]>`
9228
- */
9229
- getFormattingEditsForDocument(fileName: string, options: any): Promise<any[]>;
9230
- /**
9231
- * Get changes which should be applied to format the given range in the file.
9232
- * @param options `typescript.FormatCodeOptions`
9233
- * @returns `Promise<typescript.TextChange[]>`
9234
- */
9235
- getFormattingEditsForRange(fileName: string, start: number, end: number, options: any): Promise<any[]>;
9236
- /**
9237
- * Get formatting changes which should be applied after the given keystroke.
9238
- * @param options `typescript.FormatCodeOptions`
9239
- * @returns `Promise<typescript.TextChange[]>`
9240
- */
9241
- getFormattingEditsAfterKeystroke(fileName: string, postion: number, ch: string, options: any): Promise<any[]>;
9242
- /**
9243
- * Get other occurrences which should be updated when renaming the item at the given file and position.
9244
- * @returns `Promise<readonly typescript.RenameLocation[] | undefined>`
9245
- */
9246
- findRenameLocations(fileName: string, positon: number, findInStrings: boolean, findInComments: boolean, providePrefixAndSuffixTextForRename: boolean): Promise<readonly any[] | undefined>;
9247
- /**
9248
- * Get edits which should be applied to rename the item at the given file and position (or a failure reason).
9249
- * @param options `typescript.RenameInfoOptions`
9250
- * @returns `Promise<typescript.RenameInfo>`
9251
- */
9252
- getRenameInfo(fileName: string, positon: number, options: any): Promise<any>;
9253
- /**
9254
- * Get transpiled output for the given file.
9255
- * @returns `typescript.EmitOutput`
9256
- */
9257
- getEmitOutput(fileName: string, emitOnlyDtsFiles?: boolean, forceDtsEmit?: boolean): Promise<EmitOutput>;
9258
- /**
9259
- * Get possible code fixes at the given position in the file.
9260
- * @param formatOptions `typescript.FormatCodeOptions`
9261
- * @returns `Promise<ReadonlyArray<typescript.CodeFixAction>>`
9262
- */
9263
- getCodeFixesAtPosition(fileName: string, start: number, end: number, errorCodes: number[], formatOptions: any): Promise<ReadonlyArray<any>>;
9264
- /**
9265
- * Get inlay hints in the range of the file.
9266
- * @param fileName
9267
- * @returns `Promise<typescript.InlayHint[]>`
9268
- */
9269
- provideInlayHints(fileName: string, start: number, end: number): Promise<ReadonlyArray<any>>;
9270
- }
9271
- export const typescriptVersion: string;
9272
- export const typescriptDefaults: LanguageServiceDefaults;
9273
- export const javascriptDefaults: LanguageServiceDefaults;
9274
- export const getTypeScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
9275
- export const getJavaScriptWorker: () => Promise<(...uris: Uri[]) => Promise<TypeScriptWorker>>;
9276
- }