Giant blob of minor changes
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-tsserver / node_modules / typescript / lib / lib.es2020.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 interface Atomics {\r
22     /**\r
23      * Adds a value to the value at the given position in the array, returning the original value.\r
24      * Until this atomic operation completes, any other read or write operation against the array\r
25      * will block.\r
26      */\r
27     add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
28 \r
29     /**\r
30      * Stores the bitwise AND of a value with the value at the given position in the array,\r
31      * returning the original value. Until this atomic operation completes, any other read or\r
32      * write operation against the array will block.\r
33      */\r
34     and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
35 \r
36     /**\r
37      * Replaces the value at the given position in the array if the original value equals the given\r
38      * expected value, returning the original value. Until this atomic operation completes, any\r
39      * other read or write operation against the array will block.\r
40      */\r
41     compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint;\r
42 \r
43     /**\r
44      * Replaces the value at the given position in the array, returning the original value. Until\r
45      * this atomic operation completes, any other read or write operation against the array will\r
46      * block.\r
47      */\r
48     exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
49 \r
50     /**\r
51      * Returns the value at the given position in the array. Until this atomic operation completes,\r
52      * any other read or write operation against the array will block.\r
53      */\r
54     load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint;\r
55 \r
56     /**\r
57      * Stores the bitwise OR 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 write\r
59      * operation against the array will block.\r
60      */\r
61     or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
62 \r
63     /**\r
64      * Stores a value at the given position in the array, returning the new value. Until this\r
65      * atomic operation completes, any other read or write operation against the array will block.\r
66      */\r
67     store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
68 \r
69     /**\r
70      * Subtracts a value from the value at the given position in the array, returning the original\r
71      * value. Until this atomic operation completes, any other read or write operation against the\r
72      * array will block.\r
73      */\r
74     sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
75 \r
76     /**\r
77      * If the value at the given position in the array is equal to the provided value, the current\r
78      * agent is put to sleep causing execution to suspend until the timeout expires (returning\r
79      * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns\r
80      * `"not-equal"`.\r
81      */\r
82     wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out";\r
83 \r
84     /**\r
85      * Wakes up sleeping agents that are waiting on the given index of the array, returning the\r
86      * number of agents that were awoken.\r
87      * @param typedArray A shared BigInt64Array.\r
88      * @param index The position in the typedArray to wake up on.\r
89      * @param count The number of sleeping agents to notify. Defaults to +Infinity.\r
90      */\r
91     notify(typedArray: BigInt64Array, index: number, count?: number): number;\r
92 \r
93     /**\r
94      * Stores the bitwise XOR of a value with the value at the given position in the array,\r
95      * returning the original value. Until this atomic operation completes, any other read or write\r
96      * operation against the array will block.\r
97      */\r
98     xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint;\r
99 }\r