Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / prettier-eslint / node_modules / typescript / lib / lib.es2017.sharedmemory.d.ts
1 /*! *****************************************************************************
2 Copyright (c) Microsoft Corporation. All rights reserved.
3 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
4 this file except in compliance with the License. You may obtain a copy of the
5 License at http://www.apache.org/licenses/LICENSE-2.0
6
7 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
8 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10 MERCHANTABLITY OR NON-INFRINGEMENT.
11
12 See the Apache Version 2.0 License for specific language governing permissions
13 and limitations under the License.
14 ***************************************************************************** */
15
16
17
18 /// <reference no-default-lib="true"/>\r
19
20
21 /// <reference lib="es2015.symbol" />\r
22 /// <reference lib="es2015.symbol.wellknown" />\r
23 \r
24 interface SharedArrayBuffer {\r
25     /**\r
26      * Read-only. The length of the ArrayBuffer (in bytes).\r
27      */\r
28     readonly byteLength: number;\r
29 \r
30     /*\r
31      * The SharedArrayBuffer constructor's length property whose value is 1.\r
32      */\r
33     length: number;\r
34     /**\r
35      * Returns a section of an SharedArrayBuffer.\r
36      */\r
37     slice(begin: number, end?: number): SharedArrayBuffer;\r
38     readonly [Symbol.species]: SharedArrayBuffer;\r
39     readonly [Symbol.toStringTag]: "SharedArrayBuffer";\r
40 }\r
41 \r
42 interface SharedArrayBufferConstructor {\r
43     readonly prototype: SharedArrayBuffer;\r
44     new (byteLength: number): SharedArrayBuffer;\r
45 }\r
46 declare var SharedArrayBuffer: SharedArrayBufferConstructor;\r
47 \r
48 interface ArrayBufferTypes {\r
49     SharedArrayBuffer: SharedArrayBuffer;\r
50 }\r
51 \r
52 interface Atomics {\r
53     /**\r
54      * Adds a value to the value at the given position in the array, returning the original value.\r
55      * Until this atomic operation completes, any other read or write operation against the array\r
56      * will block.\r
57      */\r
58     add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
59 \r
60     /**\r
61      * Stores the bitwise AND of a value with the value at the given position in the array,\r
62      * returning the original value. Until this atomic operation completes, any other read or\r
63      * write operation against the array will block.\r
64      */\r
65     and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
66 \r
67     /**\r
68      * Replaces the value at the given position in the array if the original value equals the given\r
69      * expected value, returning the original value. Until this atomic operation completes, any\r
70      * other read or write operation against the array will block.\r
71      */\r
72     compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number;\r
73 \r
74     /**\r
75      * Replaces the value at the given position in the array, returning the original value. Until\r
76      * this atomic operation completes, any other read or write operation against the array will\r
77      * block.\r
78      */\r
79     exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
80 \r
81     /**\r
82      * Returns a value indicating whether high-performance algorithms can use atomic operations\r
83      * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed\r
84      * array.\r
85      */\r
86     isLockFree(size: number): boolean;\r
87 \r
88     /**\r
89      * Returns the value at the given position in the array. Until this atomic operation completes,\r
90      * any other read or write operation against the array will block.\r
91      */\r
92     load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number;\r
93 \r
94     /**\r
95      * Stores the bitwise OR of a value with the value at the given position in the array,\r
96      * returning the original value. Until this atomic operation completes, any other read or write\r
97      * operation against the array will block.\r
98      */\r
99     or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
100 \r
101     /**\r
102      * Stores a value at the given position in the array, returning the new value. Until this\r
103      * atomic operation completes, any other read or write operation against the array will block.\r
104      */\r
105     store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
106 \r
107     /**\r
108      * Subtracts a value from the value at the given position in the array, returning the original\r
109      * value. Until this atomic operation completes, any other read or write operation against the\r
110      * array will block.\r
111      */\r
112     sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
113 \r
114     /**\r
115      * If the value at the given position in the array is equal to the provided value, the current\r
116      * agent is put to sleep causing execution to suspend until the timeout expires (returning\r
117      * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns\r
118      * `"not-equal"`.\r
119      */\r
120     wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";\r
121 \r
122     /**\r
123      * Wakes up sleeping agents that are waiting on the given index of the array, returning the\r
124      * number of agents that were awoken.\r
125      */\r
126     notify(typedArray: Int32Array, index: number, count: number): number;\r
127 \r
128     /**\r
129      * Stores the bitwise XOR of a value with the value at the given position in the array,\r
130      * returning the original value. Until this atomic operation completes, any other read or write\r
131      * operation against the array will block.\r
132      */\r
133     xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
134 \r
135     readonly [Symbol.toStringTag]: "Atomics";\r
136 }\r
137 \r
138 declare var Atomics: Atomics;\r