typescript 4.5.0-dev.20211028 → 4.5.0-dev.20211101

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.
@@ -155,6 +155,7 @@ interface NamedNodeMap {
155
155
  }
156
156
 
157
157
  interface Navigator {
158
+ /** Available only in secure contexts. */
158
159
  requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
159
160
  vibrate(pattern: Iterable<number>): boolean;
160
161
  }
@@ -190,13 +191,6 @@ interface PluginArray {
190
191
  interface RTCStatsReport extends ReadonlyMap<string, any> {
191
192
  }
192
193
 
193
- interface ReadableStream<R = any> {
194
- [Symbol.iterator](): IterableIterator<any>;
195
- entries(): IterableIterator<[number, any]>;
196
- keys(): IterableIterator<number>;
197
- values(): IterableIterator<any>;
198
- }
199
-
200
194
  interface SVGLengthList {
201
195
  [Symbol.iterator](): IterableIterator<SVGLength>;
202
196
  }
@@ -497,7 +497,7 @@ interface RequestInit {
497
497
  /** An AbortSignal to set request's signal. */
498
498
  signal?: AbortSignal | null;
499
499
  /** Can only be null. Used to disassociate request from any Window. */
500
- window?: any;
500
+ window?: null;
501
501
  }
502
502
 
503
503
  interface ResponseInit {
@@ -691,7 +691,7 @@ interface AbortSignal extends EventTarget {
691
691
  declare var AbortSignal: {
692
692
  prototype: AbortSignal;
693
693
  new(): AbortSignal;
694
- // abort(): AbortSignal;
694
+ // abort(): AbortSignal; - To be re-added in the future
695
695
  };
696
696
 
697
697
  interface AbstractWorkerEventMap {
@@ -772,7 +772,10 @@ declare var ByteLengthQueuingStrategy: {
772
772
  new(init: QueuingStrategyInit): ByteLengthQueuingStrategy;
773
773
  };
774
774
 
775
- /** Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. */
775
+ /**
776
+ * Provides a storage mechanism for Request / Response object pairs that are cached, for example as part of the ServiceWorker life cycle. Note that the Cache interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec.
777
+ * Available only in secure contexts.
778
+ */
776
779
  interface Cache {
777
780
  add(request: RequestInfo): Promise<void>;
778
781
  addAll(requests: RequestInfo[]): Promise<void>;
@@ -788,7 +791,10 @@ declare var Cache: {
788
791
  new(): Cache;
789
792
  };
790
793
 
791
- /** The storage for Cache objects. */
794
+ /**
795
+ * The storage for Cache objects.
796
+ * Available only in secure contexts.
797
+ */
792
798
  interface CacheStorage {
793
799
  delete(cacheName: string): Promise<boolean>;
794
800
  has(cacheName: string): Promise<boolean>;
@@ -896,6 +902,7 @@ declare var CountQueuingStrategy: {
896
902
 
897
903
  /** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
898
904
  interface Crypto {
905
+ /** Available only in secure contexts. */
899
906
  readonly subtle: SubtleCrypto;
900
907
  getRandomValues<T extends ArrayBufferView | null>(array: T): T;
901
908
  }
@@ -905,7 +912,10 @@ declare var Crypto: {
905
912
  new(): Crypto;
906
913
  };
907
914
 
908
- /** The CryptoKey dictionary of the Web Crypto API represents a cryptographic key. */
915
+ /**
916
+ * The CryptoKey dictionary of the Web Crypto API represents a cryptographic key.
917
+ * Available only in secure contexts.
918
+ */
909
919
  interface CryptoKey {
910
920
  readonly algorithm: KeyAlgorithm;
911
921
  readonly extractable: boolean;
@@ -2157,6 +2167,7 @@ interface NavigatorOnLine {
2157
2167
  readonly onLine: boolean;
2158
2168
  }
2159
2169
 
2170
+ /** Available only in secure contexts. */
2160
2171
  interface NavigatorStorage {
2161
2172
  readonly storage: StorageManager;
2162
2173
  }
@@ -2451,7 +2462,10 @@ declare var PromiseRejectionEvent: {
2451
2462
  new(type: string, eventInitDict: PromiseRejectionEventInit): PromiseRejectionEvent;
2452
2463
  };
2453
2464
 
2454
- /** This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription. */
2465
+ /**
2466
+ * This Push API interface represents a push message that has been received. This event is sent to the global scope of a ServiceWorker. It contains the information sent from an application server to a PushSubscription.
2467
+ * Available only in secure contexts.
2468
+ */
2455
2469
  interface PushEvent extends ExtendableEvent {
2456
2470
  readonly data: PushMessageData | null;
2457
2471
  }
@@ -2461,7 +2475,10 @@ declare var PushEvent: {
2461
2475
  new(type: string, eventInitDict?: PushEventInit): PushEvent;
2462
2476
  };
2463
2477
 
2464
- /** This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications. */
2478
+ /**
2479
+ * This Push API interface provides a way to receive notifications from third-party servers as well as request URLs for push notifications.
2480
+ * Available only in secure contexts.
2481
+ */
2465
2482
  interface PushManager {
2466
2483
  getSubscription(): Promise<PushSubscription | null>;
2467
2484
  permissionState(options?: PushSubscriptionOptionsInit): Promise<PushPermissionState>;
@@ -2474,7 +2491,10 @@ declare var PushManager: {
2474
2491
  readonly supportedContentEncodings: ReadonlyArray<string>;
2475
2492
  };
2476
2493
 
2477
- /** This Push API interface provides methods which let you retrieve the push data sent by a server in various formats. */
2494
+ /**
2495
+ * This Push API interface provides methods which let you retrieve the push data sent by a server in various formats.
2496
+ * Available only in secure contexts.
2497
+ */
2478
2498
  interface PushMessageData {
2479
2499
  arrayBuffer(): ArrayBuffer;
2480
2500
  blob(): Blob;
@@ -2487,7 +2507,10 @@ declare var PushMessageData: {
2487
2507
  new(): PushMessageData;
2488
2508
  };
2489
2509
 
2490
- /** This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service. */
2510
+ /**
2511
+ * This Push API interface provides a subcription's URL endpoint and allows unsubscription from a push service.
2512
+ * Available only in secure contexts.
2513
+ */
2491
2514
  interface PushSubscription {
2492
2515
  readonly endpoint: string;
2493
2516
  readonly options: PushSubscriptionOptions;
@@ -2501,6 +2524,7 @@ declare var PushSubscription: {
2501
2524
  new(): PushSubscription;
2502
2525
  };
2503
2526
 
2527
+ /** Available only in secure contexts. */
2504
2528
  interface PushSubscriptionOptions {
2505
2529
  readonly applicationServerKey: ArrayBuffer | null;
2506
2530
  }
@@ -2518,7 +2542,6 @@ interface ReadableStream<R = any> {
2518
2542
  pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
2519
2543
  pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
2520
2544
  tee(): [ReadableStream<R>, ReadableStream<R>];
2521
- forEach(callbackfn: (value: any, key: number, parent: ReadableStream<R>) => void, thisArg?: any): void;
2522
2545
  }
2523
2546
 
2524
2547
  declare var ReadableStream: {
@@ -2633,7 +2656,10 @@ interface ServiceWorkerEventMap extends AbstractWorkerEventMap {
2633
2656
  "statechange": Event;
2634
2657
  }
2635
2658
 
2636
- /** This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object. */
2659
+ /**
2660
+ * This ServiceWorker API interface provides a reference to a service worker. Multiple browsing contexts (e.g. pages, workers, etc.) can be associated with the same service worker, each through a unique ServiceWorker object.
2661
+ * Available only in secure contexts.
2662
+ */
2637
2663
  interface ServiceWorker extends EventTarget, AbstractWorker {
2638
2664
  onstatechange: ((this: ServiceWorker, ev: Event) => any) | null;
2639
2665
  readonly scriptURL: string;
@@ -2657,7 +2683,10 @@ interface ServiceWorkerContainerEventMap {
2657
2683
  "messageerror": MessageEvent;
2658
2684
  }
2659
2685
 
2660
- /** The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. */
2686
+ /**
2687
+ * The ServiceWorkerContainer interface of the ServiceWorker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations.
2688
+ * Available only in secure contexts.
2689
+ */
2661
2690
  interface ServiceWorkerContainer extends EventTarget {
2662
2691
  readonly controller: ServiceWorker | null;
2663
2692
  oncontrollerchange: ((this: ServiceWorkerContainer, ev: Event) => any) | null;
@@ -2718,7 +2747,10 @@ interface ServiceWorkerRegistrationEventMap {
2718
2747
  "updatefound": Event;
2719
2748
  }
2720
2749
 
2721
- /** This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin. */
2750
+ /**
2751
+ * This ServiceWorker API interface represents the service worker registration. You register a service worker to control one or more pages that share the same origin.
2752
+ * Available only in secure contexts.
2753
+ */
2722
2754
  interface ServiceWorkerRegistration extends EventTarget {
2723
2755
  readonly active: ServiceWorker | null;
2724
2756
  readonly installing: ServiceWorker | null;
@@ -2763,6 +2795,7 @@ declare var SharedWorkerGlobalScope: {
2763
2795
  new(): SharedWorkerGlobalScope;
2764
2796
  };
2765
2797
 
2798
+ /** Available only in secure contexts. */
2766
2799
  interface StorageManager {
2767
2800
  estimate(): Promise<StorageEstimate>;
2768
2801
  persisted(): Promise<boolean>;
@@ -2773,7 +2806,10 @@ declare var StorageManager: {
2773
2806
  new(): StorageManager;
2774
2807
  };
2775
2808
 
2776
- /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */
2809
+ /**
2810
+ * This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto).
2811
+ * Available only in secure contexts.
2812
+ */
2777
2813
  interface SubtleCrypto {
2778
2814
  decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, key: CryptoKey, data: BufferSource): Promise<any>;
2779
2815
  deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>;
@@ -5050,6 +5086,7 @@ declare var WindowClient: {
5050
5086
  };
5051
5087
 
5052
5088
  interface WindowOrWorkerGlobalScope {
5089
+ /** Available only in secure contexts. */
5053
5090
  readonly caches: CacheStorage;
5054
5091
  readonly crossOriginIsolated: boolean;
5055
5092
  readonly crypto: Crypto;
@@ -5372,7 +5409,8 @@ declare namespace WebAssembly {
5372
5409
 
5373
5410
  var CompileError: {
5374
5411
  prototype: CompileError;
5375
- new(): CompileError;
5412
+ new(message?: string): CompileError;
5413
+ (message?: string): CompileError;
5376
5414
  };
5377
5415
 
5378
5416
  interface Global {
@@ -5399,7 +5437,8 @@ declare namespace WebAssembly {
5399
5437
 
5400
5438
  var LinkError: {
5401
5439
  prototype: LinkError;
5402
- new(): LinkError;
5440
+ new(message?: string): LinkError;
5441
+ (message?: string): LinkError;
5403
5442
  };
5404
5443
 
5405
5444
  interface Memory {
@@ -5428,7 +5467,8 @@ declare namespace WebAssembly {
5428
5467
 
5429
5468
  var RuntimeError: {
5430
5469
  prototype: RuntimeError;
5431
- new(): RuntimeError;
5470
+ new(message?: string): RuntimeError;
5471
+ (message?: string): RuntimeError;
5432
5472
  };
5433
5473
 
5434
5474
  interface Table {
@@ -5505,7 +5545,7 @@ interface PerformanceObserverCallback {
5505
5545
  }
5506
5546
 
5507
5547
  interface QueuingStrategySize<T = any> {
5508
- (chunk?: T): number;
5548
+ (chunk: T): number;
5509
5549
  }
5510
5550
 
5511
5551
  interface TransformerFlushCallback<O> {
@@ -5580,6 +5620,7 @@ declare function importScripts(...urls: (string | URL)[]): void;
5580
5620
  /** Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise. */
5581
5621
  declare function dispatchEvent(event: Event): boolean;
5582
5622
  declare var fonts: FontFaceSet;
5623
+ /** Available only in secure contexts. */
5583
5624
  declare var caches: CacheStorage;
5584
5625
  declare var crossOriginIsolated: boolean;
5585
5626
  declare var crypto: Crypto;
@@ -5668,7 +5709,7 @@ type MediaDecodingType = "file" | "media-source" | "webrtc";
5668
5709
  type MediaEncodingType = "record" | "webrtc";
5669
5710
  type NotificationDirection = "auto" | "ltr" | "rtl";
5670
5711
  type NotificationPermission = "default" | "denied" | "granted";
5671
- type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock";
5712
+ type PermissionName = "geolocation" | "notifications" | "persistent-storage" | "push" | "screen-wake-lock" | "xr-spatial-tracking";
5672
5713
  type PermissionState = "denied" | "granted" | "prompt";
5673
5714
  type PredefinedColorSpace = "display-p3" | "srgb";
5674
5715
  type PremultiplyAlpha = "default" | "none" | "premultiply";
@@ -76,13 +76,6 @@ interface MessageEvent<T = any> {
76
76
  initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void;
77
77
  }
78
78
 
79
- interface ReadableStream<R = any> {
80
- [Symbol.iterator](): IterableIterator<any>;
81
- entries(): IterableIterator<[number, any]>;
82
- keys(): IterableIterator<number>;
83
- values(): IterableIterator<any>;
84
- }
85
-
86
79
  interface SubtleCrypto {
87
80
  deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
88
81
  generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
@@ -839,6 +839,7 @@
839
839
  "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "Tag „@typedef” JSDoc powinien mieć adnotację typu lub powinien po nim następować tag „@property” lub „@member”.",
840
840
  "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Typy JSDoc mogą być używane wyłącznie w komentarzach dokumentacji.",
841
841
  "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Typy JSDoc mogą być przenoszone do typów TypeScript.",
842
+ "JSON_imports_are_experimental_in_ES_module_mode_imports_7062": "Importy JSON są eksperymentalne w importach w trybie modułu ES.",
842
843
  "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000": "Atrybuty JSX muszą mieć przypisane wyrażenie, które nie jest puste.",
843
844
  "JSX_element_0_has_no_corresponding_closing_tag_17008": "Element JSX „{0}” nie ma odpowiedniego tagu zamykającego.",
844
845
  "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607": "Klasa elementów JSX nie obsługuje atrybutów, ponieważ nie ma właściwości „{0}”.",
package/lib/protocol.d.ts CHANGED
@@ -2637,6 +2637,13 @@ declare namespace ts.server.protocol {
2637
2637
  * values, with insertion text to replace preceding `.` tokens with `?.`.
2638
2638
  */
2639
2639
  readonly includeAutomaticOptionalChainCompletions?: boolean;
2640
+ /**
2641
+ * If enabled, completions for class members (e.g. methods and properties) will include
2642
+ * a whole declaration for the member.
2643
+ * E.g., `class A { f| }` could be completed to `class A { foo(): number {} }`, instead of
2644
+ * `class A { foo }`.
2645
+ */
2646
+ readonly includeCompletionsWithClassMemberSnippets?: boolean;
2640
2647
  readonly allowIncompleteCompletions?: boolean;
2641
2648
  readonly importModuleSpecifierPreference?: "shortest" | "project-relative" | "relative" | "non-relative";
2642
2649
  /** Determines whether we import `foo/index.ts` as "foo", "foo/index", or "foo/index.js" */
@@ -839,6 +839,7 @@
839
839
  "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "A marca JSDoc \"@typedef\" deve ter uma anotação de tipo ou ser seguida pelas marcas \"@property\" or \"@member\".",
840
840
  "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Os tipos de JSDoc podem ser usados somente dentro dos comentários de documentação.",
841
841
  "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Tipos JSDoc podem ser movidos para tipos TypeScript.",
842
+ "JSON_imports_are_experimental_in_ES_module_mode_imports_7062": "As importações JSON são experimentais em importações de modo de módulo ES.",
842
843
  "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000": "Os atributos JSX só devem ser atribuídos a 'expressões' que não estejam vazias.",
843
844
  "JSX_element_0_has_no_corresponding_closing_tag_17008": "O elemento JSX '{0}' não tem uma marcação de fechamento correspondente.",
844
845
  "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607": "A classe do elemento JSX não dá suporte a atributos porque não tem uma propriedade '{0}'.",
@@ -839,6 +839,7 @@
839
839
  "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "У тега \"@typedef\" JSDoc должна быть аннотация типа, или после него должны стоять теги \"@property\" или \"@member\".",
840
840
  "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "Типы JSDoc можно использовать только в комментариях в документации.",
841
841
  "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "Типы JSDoc могут быть преобразованы в типы TypeScript.",
842
+ "JSON_imports_are_experimental_in_ES_module_mode_imports_7062": "Импорт данных JSON — экспериментальная функция импорта в режиме модуля ES.",
842
843
  "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000": "Атрибутам JSX должно назначаться только непустое \"expression\".",
843
844
  "JSX_element_0_has_no_corresponding_closing_tag_17008": "Элемент JSX \"{0}\" не содержит соответствующий закрывающий тег.",
844
845
  "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607": "Класс элементов JSX не поддерживает атрибуты, так как не имеет свойства \"{0}\".",
@@ -839,6 +839,7 @@
839
839
  "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021": "JSDoc '@typedef' etiketi bir tür ek açıklamasına sahip olmalıdır veya sonrasında '@property' ya da '@member' etiketlerinden biri gelmelidir.",
840
840
  "JSDoc_types_can_only_be_used_inside_documentation_comments_8020": "JSDoc türleri yalnızca belge açıklamalarının içinde kullanılabilir.",
841
841
  "JSDoc_types_may_be_moved_to_TypeScript_types_80004": "JSDoc türleri TypeScript türlerine taşınabilir.",
842
+ "JSON_imports_are_experimental_in_ES_module_mode_imports_7062": "JSON içeri aktarmaları, ES modül modu içeri aktarmaları için deneyseldir.",
842
843
  "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000": "JSX özniteliklerine yalnızca boş olmayan 'expression' ifadesi atanabilir.",
843
844
  "JSX_element_0_has_no_corresponding_closing_tag_17008": "'{0}' adlı JSX öğesine karşılık gelen bir kapatma etiketi yok.",
844
845
  "JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607": "JSX öğe sınıfı, '{0}' özelliğine sahip olmadığı için öznitelikleri desteklemiyor.",