Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-html / 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      * Returns a section of an SharedArrayBuffer.\r
32      */\r
33     slice(begin: number, end?: number): SharedArrayBuffer;\r
34     readonly [Symbol.species]: SharedArrayBuffer;\r
35     readonly [Symbol.toStringTag]: "SharedArrayBuffer";\r
36 }\r
37 \r
38 interface SharedArrayBufferConstructor {\r
39     readonly prototype: SharedArrayBuffer;\r
40     new (byteLength: number): SharedArrayBuffer;\r
41 }\r
42 declare var SharedArrayBuffer: SharedArrayBufferConstructor;\r
43 \r
44 interface ArrayBufferTypes {\r
45     SharedArrayBuffer: SharedArrayBuffer;\r
46 }\r
47 \r
48 interface Atomics {\r
49     /**\r
50      * Adds a value to the value at the given position in the array, returning the original value.\r
51      * Until this atomic operation completes, any other read or write operation against the array\r
52      * will block.\r
53      */\r
54     add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
55 \r
56     /**\r
57      * Stores the bitwise AND of a value with the value at the given position in the array,\r
58      * returning the original value. Until this atomic operation completes, any other read or\r
59      * write operation against the array will block.\r
60      */\r
61     and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
62 \r
63     /**\r
64      * Replaces the value at the given position in the array if the original value equals the given\r
65      * expected value, returning the original value. Until this atomic operation completes, any\r
66      * other read or write operation against the array will block.\r
67      */\r
68     compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number;\r
69 \r
70     /**\r
71      * Replaces the value at the given position in the array, returning the original value. Until\r
72      * this atomic operation completes, any other read or write operation against the array will\r
73      * block.\r
74      */\r
75     exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
76 \r
77     /**\r
78      * Returns a value indicating whether high-performance algorithms can use atomic operations\r
79      * (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed\r
80      * array.\r
81      */\r
82     isLockFree(size: number): boolean;\r
83 \r
84     /**\r
85      * Returns the value at the given position in the array. Until this atomic operation completes,\r
86      * any other read or write operation against the array will block.\r
87      */\r
88     load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number;\r
89 \r
90     /**\r
91      * Stores the bitwise OR of a value with the value at the given position in the array,\r
92      * returning the original value. Until this atomic operation completes, any other read or write\r
93      * operation against the array will block.\r
94      */\r
95     or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
96 \r
97     /**\r
98      * Stores a value at the given position in the array, returning the new value. Until this\r
99      * atomic operation completes, any other read or write operation against the array will block.\r
100      */\r
101     store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
102 \r
103     /**\r
104      * Subtracts a value from the value at the given position in the array, returning the original\r
105      * value. Until this atomic operation completes, any other read or write operation against the\r
106      * array will block.\r
107      */\r
108     sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
109 \r
110     /**\r
111      * If the value at the given position in the array is equal to the provided value, the current\r
112      * agent is put to sleep causing execution to suspend until the timeout expires (returning\r
113      * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns\r
114      * `"not-equal"`.\r
115      */\r
116     wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out";\r
117 \r
118     /**\r
119      * Wakes up sleeping agents that are waiting on the given index of the array, returning the\r
120      * number of agents that were awoken.\r
121      * @param typedArray A shared Int32Array.\r
122      * @param index The position in the typedArray to wake up on.\r
123      * @param count The number of sleeping agents to notify. Defaults to +Infinity.\r
124      */\r
125     notify(typedArray: Int32Array, index: number, count?: number): number;\r
126 \r
127     /**\r
128      * Stores the bitwise XOR of a value with the value at the given position in the array,\r
129      * returning the original value. Until this atomic operation completes, any other read or write\r
130      * operation against the array will block.\r
131      */\r
132     xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number;\r
133 \r
134     readonly [Symbol.toStringTag]: "Atomics";\r
135 }\r
136 \r
137 declare var Atomics: Atomics;\r