ecma.json 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284
  1. {
  2. "!name": "ecmascript",
  3. "!define": {
  4. "Error.prototype": "Error.prototype",
  5. "propertyDescriptor": {
  6. "enumerable": "bool",
  7. "configurable": "bool",
  8. "value": "?",
  9. "writable": "bool",
  10. "get": "fn() -> ?",
  11. "set": "fn(value: ?)"
  12. },
  13. "Promise.prototype": {
  14. "catch": {
  15. "!type": "fn(onRejected: fn(reason: ?)) -> !this"
  16. },
  17. "then": {
  18. "!type": "fn(onFulfilled: fn(value: ?), onRejected: fn(reason: ?)) -> !custom:Promise_then",
  19. "!effects": ["call !0 !this.:t"]
  20. },
  21. "finally": {
  22. "!type": "fn(onFinally: fn()) -> !custom:Promise_then"
  23. }
  24. },
  25. "Promise_reject": {
  26. "!type": "fn(reason: ?) -> !this"
  27. },
  28. "iter_prototype": {
  29. ":Symbol.iterator": "fn() -> !this"
  30. },
  31. "iter": {
  32. "!proto": "iter_prototype",
  33. "next": {
  34. "!type": "fn() -> +iter_result[value=!this.:t]"
  35. }
  36. },
  37. "iter_result": {
  38. "done": "bool",
  39. "value": "?"
  40. },
  41. "generator_prototype": {
  42. "!proto": "iter_prototype",
  43. "next": "fn(value?: ?) -> iter_result",
  44. "return": "fn(value?: ?) -> iter_result",
  45. "throw": "fn(exception: +Error)"
  46. },
  47. "async_iter_prototype": {
  48. ":Symbol.asyncIterator": "fn() -> !this"
  49. },
  50. "async_iter": {
  51. "!proto": "async_iter_prototype",
  52. "next": {
  53. "!type": "fn() -> +Promise[:t=+iter_result[value=!this.:t]]"
  54. }
  55. },
  56. "async_generator_prototype": {
  57. "!proto": "async_iter_prototype",
  58. "next": "fn(value?: ?) -> +Promise[:t=iter_result]",
  59. "return": "fn(value?: ?) -> +Promise[:t=iter_result]",
  60. "throw": "fn(exception: +Error)"
  61. },
  62. "Proxy_handler": {
  63. "getPrototypeOf": "fn(target: ?)",
  64. "setPrototypeOf": "fn(target: ?, prototype: ?)",
  65. "isExtensible": "fn(target: ?)",
  66. "preventExtensions": "fn(target: ?)",
  67. "getOwnPropertyDescriptor": "fn(target: ?, property: string) -> propertyDescriptor",
  68. "defineProperty": "fn(target: ?, property: string, descriptor: propertyDescriptor)",
  69. "has": "fn(target: ?, property: string)",
  70. "get": "fn(target: ?, property: string)",
  71. "set": "fn(target: ?, property: string, value: ?)",
  72. "deleteProperty": "fn(target: ?, property: string)",
  73. "enumerate": "fn(target: ?)",
  74. "ownKeys": "fn(target: ?)",
  75. "apply": "fn(target: ?, self: ?, arguments: [?])",
  76. "construct": "fn(target: ?, arguments: [?])"
  77. },
  78. "Proxy_revocable": {
  79. "proxy": "+Proxy",
  80. "revoke": "fn()"
  81. },
  82. "TypedArray": {
  83. "!type": "fn(size: number)",
  84. "from": {
  85. "!type": "fn(arrayLike: ?, mapFn?: fn(elt: ?, i: number) -> number, thisArg?: ?) -> +TypedArray",
  86. "!effects": ["call !1 this=!2 !0.<i> number"]
  87. },
  88. "of": {
  89. "!type": "fn(elements: number) -> +TypedArray"
  90. },
  91. "BYTES_PER_ELEMENT": {
  92. "!type": "number"
  93. },
  94. "name": {
  95. "!type": "string"
  96. },
  97. "prototype": {
  98. "<i>": "number",
  99. "buffer": {
  100. "!type": "+ArrayBuffer"
  101. },
  102. "byteLength": {
  103. "!type": "number"
  104. },
  105. "byteOffset": {
  106. "!type": "number"
  107. },
  108. "copyWithin": {
  109. "!type": "fn(target: number, start: number, end?: number) -> ?"
  110. },
  111. "entries": {
  112. "!type": "fn() -> +iter[:t=number]"
  113. },
  114. "every": {
  115. "!type": "fn(callback: fn(element: number, index: number, array: TypedArray) -> bool, thisArg?: ?) -> bool",
  116. "!effects": ["call !0 this=!1 number number !this"]
  117. },
  118. "fill": {
  119. "!type": "fn(value: number, start?: number, end?: number)"
  120. },
  121. "filter": {
  122. "!type": "fn(test: fn(element: number, i: number) -> bool, context?: ?) -> !this",
  123. "!effects": ["call !0 this=!1 number number"]
  124. },
  125. "find": {
  126. "!type": "fn(callback: fn(element: number, index: number, array: +TypedArray) -> bool, thisArg?: ?) -> number",
  127. "!effects": ["call !0 this=!1 number number !this"]
  128. },
  129. "findIndex": {
  130. "!type": "fn(callback: fn(element: number, index: number, array: +TypedArray) -> bool, thisArg?: ?) -> number",
  131. "!effects": ["call !0 this=!1 number number !this"]
  132. },
  133. "forEach": {
  134. "!type": "fn(callback: fn(value: number, key: number, array: +TypedArray), thisArg?: ?)",
  135. "!effects": ["call !0 this=!1 number number !this"]
  136. },
  137. "indexOf": {
  138. "!type": "fn(searchElement: number, fromIndex?: number) -> number"
  139. },
  140. "join": {
  141. "!type": "fn(separator?: string) -> string"
  142. },
  143. "keys": {
  144. "!type": "fn() -> +iter[:t=number]"
  145. },
  146. "lastIndexOf": {
  147. "!type": "fn(searchElement: number, fromIndex?: number) -> number"
  148. },
  149. "length": {
  150. "!type": "number"
  151. },
  152. "map": {
  153. "!type": "fn(f: fn(element: number, i: number) -> number, context?: ?) -> +TypedArray",
  154. "!effects": ["call !0 this=!1 number number"]
  155. },
  156. "reduce": {
  157. "!type": "fn(combine: fn(sum: ?, elt: number, i: number) -> ?, init?: ?) -> !0.!ret",
  158. "!effects": ["call !0 !1 number number"]
  159. },
  160. "reduceRight": {
  161. "!type": "fn(combine: fn(sum: ?, elt: number, i: number) -> ?, init?: ?) -> !0.!ret",
  162. "!effects": ["call !0 !1 number number"]
  163. },
  164. "reverse": {
  165. "!type": "fn()"
  166. },
  167. "set": {
  168. "!type": "fn(array: [number], offset?: number)"
  169. },
  170. "slice": {
  171. "!type": "fn(from: number, to?: number) -> +TypedArray"
  172. },
  173. "some": {
  174. "!type": "fn(test: fn(elt: number, i: number) -> bool, context?: ?) -> bool",
  175. "!effects": ["call !0 this=!1 number number"]
  176. },
  177. "sort": {
  178. "!type": "fn(compare?: fn(a: number, b: number) -> number)",
  179. "!effects": ["call !0 number number"]
  180. },
  181. "subarray": {
  182. "!type": "fn(begin?: number, end?: number) -> +TypedArray"
  183. },
  184. "values": {
  185. "!type": "fn() -> +iter[:t=number]"
  186. },
  187. ":Symbol.iterator": {
  188. "!type": "fn() -> +iter[:t=number]"
  189. }
  190. }
  191. }
  192. },
  193. "Infinity": {
  194. "!type": "number"
  195. },
  196. "undefined": {
  197. "!type": "?"
  198. },
  199. "NaN": {
  200. "!type": "number"
  201. },
  202. "Object": {
  203. "!type": "fn()",
  204. "getPrototypeOf": {
  205. "!type": "fn(obj: ?) -> ?"
  206. },
  207. "create": {
  208. "!type": "fn(proto: ?) -> !custom:Object_create"
  209. },
  210. "defineProperty": {
  211. "!type": "fn(obj: ?, prop: string, desc: propertyDescriptor) -> !custom:Object_defineProperty"
  212. },
  213. "defineProperties": {
  214. "!type": "fn(obj: ?, props: ?) -> !custom:Object_defineProperties"
  215. },
  216. "getOwnPropertyDescriptor": {
  217. "!type": "fn(obj: ?, prop: string) -> propertyDescriptor"
  218. },
  219. "keys": {
  220. "!type": "fn(obj: ?) -> [string]"
  221. },
  222. "getOwnPropertyNames": {
  223. "!type": "fn(obj: ?) -> [string]"
  224. },
  225. "seal": {
  226. "!type": "fn(obj: ?)"
  227. },
  228. "isSealed": {
  229. "!type": "fn(obj: ?) -> bool"
  230. },
  231. "freeze": {
  232. "!type": "fn(obj: ?) -> !0"
  233. },
  234. "isFrozen": {
  235. "!type": "fn(obj: ?) -> bool"
  236. },
  237. "preventExtensions": {
  238. "!type": "fn(obj: ?)"
  239. },
  240. "isExtensible": {
  241. "!type": "fn(obj: ?) -> bool"
  242. },
  243. "assign": {
  244. "!type": "fn(target: ?, source: ?, source?: ?) -> !0",
  245. "!effects": ["copy !1 !0", "copy !2 !0", "copy !3 !0"]
  246. },
  247. "getOwnPropertySymbols": {
  248. "!type": "fn(obj: ?) -> !custom:getOwnPropertySymbols"
  249. },
  250. "is": {
  251. "!type": "fn(value1: ?, value2: ?) -> bool"
  252. },
  253. "setPrototypeOf": {
  254. "!type": "fn(obj: ?, prototype: ?)"
  255. },
  256. "prototype": {
  257. "!stdProto": "Object",
  258. "toString": {
  259. "!type": "fn() -> string"
  260. },
  261. "toLocaleString": {
  262. "!type": "fn() -> string"
  263. },
  264. "valueOf": {
  265. "!type": "fn() -> number"
  266. },
  267. "hasOwnProperty": {
  268. "!type": "fn(prop: string) -> bool"
  269. },
  270. "propertyIsEnumerable": {
  271. "!type": "fn(prop: string) -> bool"
  272. },
  273. "isPrototypeOf": {
  274. "!type": "fn(obj: ?) -> bool"
  275. }
  276. }
  277. },
  278. "Function": {
  279. "!type": "fn(body: string) -> fn()",
  280. "prototype": {
  281. "!stdProto": "Function",
  282. "apply": {
  283. "!type": "fn(this: ?, args: [?])",
  284. "!effects": [
  285. "call and return !this this=!0 !1.<i> !1.<i> !1.<i>"
  286. ]
  287. },
  288. "call": {
  289. "!type": "fn(this: ?, args?: ?) -> !this.!ret",
  290. "!effects": [
  291. "call and return !this this=!0 !1 !2 !3 !4"
  292. ]
  293. },
  294. "bind": {
  295. "!type": "fn(this: ?, args?: ?) -> !custom:Function_bind"
  296. },
  297. "prototype": "?"
  298. }
  299. },
  300. "Array": {
  301. "!type": "fn(size: number) -> !custom:Array_ctor",
  302. "isArray": {
  303. "!type": "fn(value: ?) -> bool"
  304. },
  305. "from": {
  306. "!type": "fn(arrayLike: ?, mapFn?: fn(elt: ?, i: number) -> ?, thisArg?: ?) -> [!0.<i>]",
  307. "!effects": [
  308. "call !1 this=!2 !0.<i> number"
  309. ]
  310. },
  311. "of": {
  312. "!type": "fn(elementN: ?) -> [!0]"
  313. },
  314. "prototype": {
  315. "!stdProto": "Array",
  316. "length": {
  317. "!type": "number"
  318. },
  319. "concat": {
  320. "!type": "fn(other: [?]) -> !this"
  321. },
  322. "join": {
  323. "!type": "fn(separator?: string) -> string"
  324. },
  325. "splice": {
  326. "!type": "fn(pos: number, amount: number, newelt?: ?) -> [?]"
  327. },
  328. "pop": {
  329. "!type": "fn() -> !this.<i>"
  330. },
  331. "push": {
  332. "!type": "fn(newelt: ?) -> number",
  333. "!effects": [
  334. "propagate !0 !this.<i>"
  335. ]
  336. },
  337. "shift": {
  338. "!type": "fn() -> !this.<i>"
  339. },
  340. "unshift": {
  341. "!type": "fn(newelt: ?) -> number",
  342. "!effects": [
  343. "propagate !0 !this.<i>"
  344. ]
  345. },
  346. "slice": {
  347. "!type": "fn(from?: number, to?: number) -> !this"
  348. },
  349. "reverse": {
  350. "!type": "fn()"
  351. },
  352. "sort": {
  353. "!type": "fn(compare?: fn(a: ?, b: ?) -> number)",
  354. "!effects": [
  355. "call !0 !this.<i> !this.<i>"
  356. ]
  357. },
  358. "indexOf": {
  359. "!type": "fn(elt: ?, from?: number) -> number"
  360. },
  361. "lastIndexOf": {
  362. "!type": "fn(elt: ?, from?: number) -> number"
  363. },
  364. "every": {
  365. "!type": "fn(test: fn(elt: ?, i: number, array: +Array) -> bool, context?: ?) -> bool",
  366. "!effects": [
  367. "call !0 this=!1 !this.<i> number !this"
  368. ]
  369. },
  370. "some": {
  371. "!type": "fn(test: fn(elt: ?, i: number, array: +Array) -> bool, context?: ?) -> bool",
  372. "!effects": [
  373. "call !0 this=!1 !this.<i> number !this"
  374. ]
  375. },
  376. "filter": {
  377. "!type": "fn(test: fn(elt: ?, i: number, array: +Array) -> bool, context?: ?) -> !this",
  378. "!effects": [
  379. "call !0 this=!1 !this.<i> number !this"
  380. ]
  381. },
  382. "forEach": {
  383. "!type": "fn(f: fn(elt: ?, i: number, array: +Array), context?: ?)",
  384. "!effects": [
  385. "call !0 this=!1 !this.<i> number !this"
  386. ]
  387. },
  388. "map": {
  389. "!type": "fn(f: fn(elt: ?, i: number, array: +Array) -> ?, context?: ?) -> [!0.!ret]",
  390. "!effects": [
  391. "call !0 this=!1 !this.<i> number !this"
  392. ]
  393. },
  394. "reduce": {
  395. "!type": "fn(combine: fn(sum: ?, elt: ?, i: number, array: +Array) -> ?, init?: ?) -> !0.!ret",
  396. "!effects": [
  397. "call !0 !1 !this.<i> number !this"
  398. ]
  399. },
  400. "reduceRight": {
  401. "!type": "fn(combine: fn(sum: ?, elt: ?, i: number, array: +Array) -> ?, init?: ?) -> !0.!ret",
  402. "!effects": [
  403. "call !0 !1 !this.<i> number !this"
  404. ]
  405. },
  406. "copyWithin": {
  407. "!type": "fn(target: number, start: number, end?: number) -> !this"
  408. },
  409. "entries": {
  410. "!type": "fn() -> +iter[:t=[number, !this.<i>]]"
  411. },
  412. "fill": {
  413. "!type": "fn(value: ?, start?: number, end?: number) -> !this"
  414. },
  415. "find": {
  416. "!type": "fn(callback: fn(element: ?, index: number, array: [?]) -> bool, thisArg?: ?) -> !this.<i>",
  417. "!effects": ["call !0 this=!2 !this.<i> number"]
  418. },
  419. "findIndex": {
  420. "!type": "fn(callback: fn(element: ?, index: number, array: [?]), thisArg?: ?) -> number",
  421. "!effects": ["call !0 this=!2 !this.<i> number"]
  422. },
  423. "keys": {
  424. "!type": "fn() -> +iter[:t=number]"
  425. },
  426. "values": {
  427. "!type": "fn() -> +iter[:t=!this.<i>]"
  428. },
  429. ":Symbol.iterator": {
  430. "!type": "fn() -> +iter[:t=!this.<i>]"
  431. },
  432. "includes": {
  433. "!type": "fn(value: ?, fromIndex?: number) -> bool"
  434. }
  435. }
  436. },
  437. "String": {
  438. "!type": "fn(value: ?) -> string",
  439. "fromCharCode": {
  440. "!type": "fn(code: number) -> string"
  441. },
  442. "fromCodePoint": {
  443. "!type": "fn(point: number, point?: number) -> string"
  444. },
  445. "raw": {
  446. "!type": "fn(template: [string], substitutions: ?, templateString: ?) -> string"
  447. },
  448. "prototype": {
  449. "!stdProto": "String",
  450. "length": {
  451. "!type": "number"
  452. },
  453. "<i>": "string",
  454. "charAt": {
  455. "!type": "fn(i: number) -> string"
  456. },
  457. "charCodeAt": {
  458. "!type": "fn(i: number) -> number"
  459. },
  460. "indexOf": {
  461. "!type": "fn(char: string, from?: number) -> number"
  462. },
  463. "lastIndexOf": {
  464. "!type": "fn(char: string, from?: number) -> number"
  465. },
  466. "substring": {
  467. "!type": "fn(from: number, to?: number) -> string"
  468. },
  469. "substr": {
  470. "!type": "fn(from: number, length?: number) -> string"
  471. },
  472. "slice": {
  473. "!type": "fn(from: number, to?: number) -> string"
  474. },
  475. "padStart": {
  476. "!type": "fn(targetLength: number, padString?: string) -> string"
  477. },
  478. "padEnd": {
  479. "!type": "fn(targetLength: number, padString?: string) -> string"
  480. },
  481. "trim": {
  482. "!type": "fn() -> string"
  483. },
  484. "trimStart": {
  485. "!type": "fn() -> string"
  486. },
  487. "trimLeft": "String.prototype.trimStart",
  488. "trimEnd": {
  489. "!type": "fn() -> string"
  490. },
  491. "trimRight": "String.prototype.trimEnd",
  492. "toUpperCase": {
  493. "!type": "fn() -> string"
  494. },
  495. "toLowerCase": {
  496. "!type": "fn() -> string"
  497. },
  498. "toLocaleUpperCase": {
  499. "!type": "fn() -> string"
  500. },
  501. "toLocaleLowerCase": {
  502. "!type": "fn() -> string"
  503. },
  504. "split": {
  505. "!type": "fn(pattern?: string|+RegExp, limit?: number) -> [string]"
  506. },
  507. "concat": {
  508. "!type": "fn(other: string) -> string"
  509. },
  510. "localeCompare": {
  511. "!type": "fn(other: string) -> number"
  512. },
  513. "match": {
  514. "!type": "fn(pattern: +RegExp) -> [string]"
  515. },
  516. "replace": {
  517. "!type": "fn(pattern: string|+RegExp, replacement: string) -> string"
  518. },
  519. "search": {
  520. "!type": "fn(pattern: +RegExp) -> number"
  521. },
  522. "codePointAt": {
  523. "!type": "fn(pos: number) -> number"
  524. },
  525. "endsWith": {
  526. "!type": "fn(searchString: string, position?: number) -> bool"
  527. },
  528. "includes": {
  529. "!type": "fn(searchString: string, position?: number) -> bool"
  530. },
  531. "normalize": {
  532. "!type": "fn(form: string) -> string"
  533. },
  534. "repeat": {
  535. "!type": "fn(count: number) -> string"
  536. },
  537. "startsWith": {
  538. "!type": "fn(searchString: string, position?: number) -> bool"
  539. },
  540. ":Symbol.iterator": {
  541. "!type": "fn() -> +iter[:t=string]"
  542. }
  543. }
  544. },
  545. "Number": {
  546. "!type": "fn(value: ?) -> number",
  547. "MAX_VALUE": {
  548. "!type": "number"
  549. },
  550. "MIN_VALUE": {
  551. "!type": "number"
  552. },
  553. "POSITIVE_INFINITY": {
  554. "!type": "number"
  555. },
  556. "NEGATIVE_INFINITY": {
  557. "!type": "number"
  558. },
  559. "prototype": {
  560. "!stdProto": "Number",
  561. "toString": {
  562. "!type": "fn(radix?: number) -> string"
  563. },
  564. "toFixed": {
  565. "!type": "fn(digits: number) -> string"
  566. },
  567. "toExponential": {
  568. "!type": "fn(digits: number) -> string"
  569. },
  570. "toPrecision": {
  571. "!type": "fn(digits: number) -> string"
  572. }
  573. },
  574. "EPSILON": {
  575. "!type": "number"
  576. },
  577. "MAX_SAFE_INTEGER": {
  578. "!type": "number"
  579. },
  580. "MIN_SAFE_INTEGER": {
  581. "!type": "number"
  582. },
  583. "isFinite": {
  584. "!type": "fn(testValue: ?) -> bool"
  585. },
  586. "isInteger": {
  587. "!type": "fn(testValue: ?) -> bool"
  588. },
  589. "isNaN": {
  590. "!type": "fn(testValue: ?) -> bool"
  591. },
  592. "isSafeInteger": {
  593. "!type": "fn(testValue: ?) -> bool"
  594. },
  595. "parseFloat": {
  596. "!type": "fn(string: string) -> number"
  597. },
  598. "parseInt": {
  599. "!type": "fn(string: string, radix?: number) -> number"
  600. }
  601. },
  602. "Boolean": {
  603. "!type": "fn(value: ?) -> bool",
  604. "prototype": {
  605. "!stdProto": "Boolean"
  606. }
  607. },
  608. "RegExp": {
  609. "!type": "fn(source: string, flags?: string)",
  610. "prototype": {
  611. "!stdProto": "RegExp",
  612. "exec": {
  613. "!type": "fn(input: string) -> [string]"
  614. },
  615. "test": {
  616. "!type": "fn(input: string) -> bool"
  617. },
  618. "global": {
  619. "!type": "bool"
  620. },
  621. "ignoreCase": {
  622. "!type": "bool"
  623. },
  624. "multiline": {
  625. "!type": "bool"
  626. },
  627. "source": {
  628. "!type": "string"
  629. },
  630. "lastIndex": {
  631. "!type": "number"
  632. },
  633. "flags": {
  634. "!type": "string"
  635. },
  636. "sticky": {
  637. "!type": "bool"
  638. },
  639. "unicode": {
  640. "!type": "bool"
  641. }
  642. }
  643. },
  644. "Date": {
  645. "!type": "fn(ms: number)",
  646. "parse": {
  647. "!type": "fn(source: string) -> +Date"
  648. },
  649. "UTC": {
  650. "!type": "fn(year: number, month: number, date: number, hour?: number, min?: number, sec?: number, ms?: number) -> number"
  651. },
  652. "now": {
  653. "!type": "fn() -> number"
  654. },
  655. "prototype": {
  656. "toUTCString": {
  657. "!type": "fn() -> string"
  658. },
  659. "toISOString": {
  660. "!type": "fn() -> string"
  661. },
  662. "toDateString": {
  663. "!type": "fn() -> string"
  664. },
  665. "toGMTString": {
  666. "!type": "fn() -> string"
  667. },
  668. "toTimeString": {
  669. "!type": "fn() -> string"
  670. },
  671. "toLocaleDateString": {
  672. "!type": "fn() -> string"
  673. },
  674. "toLocaleFormat": {
  675. "!type": "fn(formatString: string) -> string"
  676. },
  677. "toLocaleString": {
  678. "!type": "fn(locales?: string, options?: ?) -> string"
  679. },
  680. "toLocaleTimeString": {
  681. "!type": "fn() -> string"
  682. },
  683. "toSource": {
  684. "!type": "fn() -> string"
  685. },
  686. "toString": {
  687. "!type": "fn() -> string"
  688. },
  689. "valueOf": {
  690. "!type": "fn() -> number"
  691. },
  692. "getTime": {
  693. "!type": "fn() -> number"
  694. },
  695. "getFullYear": {
  696. "!type": "fn() -> number"
  697. },
  698. "getYear": {
  699. "!type": "fn() -> number"
  700. },
  701. "getMonth": {
  702. "!type": "fn() -> number"
  703. },
  704. "getUTCMonth": {
  705. "!type": "fn() -> number"
  706. },
  707. "getDate": {
  708. "!type": "fn() -> number"
  709. },
  710. "getUTCDate": {
  711. "!type": "fn() -> number"
  712. },
  713. "getDay": {
  714. "!type": "fn() -> number"
  715. },
  716. "getUTCDay": {
  717. "!type": "fn() -> number"
  718. },
  719. "getUTCFullYear": {
  720. "!type": "fn() -> number"
  721. },
  722. "getHours": {
  723. "!type": "fn() -> number"
  724. },
  725. "getUTCHours": {
  726. "!type": "fn() -> number"
  727. },
  728. "getMinutes": {
  729. "!type": "fn() -> number"
  730. },
  731. "getUTCMinutes": {
  732. "!type": "fn() -> number"
  733. },
  734. "getSeconds": {
  735. "!type": "fn() -> number"
  736. },
  737. "getUTCSeconds": {
  738. "!type": "fn() -> number"
  739. },
  740. "getMilliseconds": {
  741. "!type": "fn() -> number"
  742. },
  743. "getUTCMilliseconds": {
  744. "!type": "fn() -> number"
  745. },
  746. "getTimezoneOffset": {
  747. "!type": "fn() -> number"
  748. },
  749. "setTime": {
  750. "!type": "fn(date: +Date) -> number"
  751. },
  752. "setFullYear": {
  753. "!type": "fn(year: number) -> number"
  754. },
  755. "setUTCFullYear": {
  756. "!type": "fn(year: number) -> number"
  757. },
  758. "setYear": {
  759. "!type": "fn(yearValue: number) -> number"
  760. },
  761. "setMonth": {
  762. "!type": "fn(month: number) -> number"
  763. },
  764. "setUTCMonth": {
  765. "!type": "fn(month: number) -> number"
  766. },
  767. "setDate": {
  768. "!type": "fn(day: number) -> number"
  769. },
  770. "setUTCDate": {
  771. "!type": "fn(day: number) -> number"
  772. },
  773. "setHours": {
  774. "!type": "fn(hour: number) -> number"
  775. },
  776. "setUTCHours": {
  777. "!type": "fn(hour: number) -> number"
  778. },
  779. "setMinutes": {
  780. "!type": "fn(min: number) -> number"
  781. },
  782. "setUTCMinutes": {
  783. "!type": "fn(min: number) -> number"
  784. },
  785. "setSeconds": {
  786. "!type": "fn(sec: number) -> number"
  787. },
  788. "setUTCSeconds": {
  789. "!type": "fn(sec: number) -> number"
  790. },
  791. "setMilliseconds": {
  792. "!type": "fn(ms: number) -> number"
  793. },
  794. "setUTCMilliseconds": {
  795. "!type": "fn(ms: number) -> number"
  796. },
  797. "toJSON": {
  798. "!type": "fn() -> string"
  799. }
  800. }
  801. },
  802. "Error": {
  803. "!type": "fn(message: string)",
  804. "prototype": {
  805. "name": {
  806. "!type": "string"
  807. },
  808. "message": {
  809. "!type": "string"
  810. }
  811. }
  812. },
  813. "SyntaxError": {
  814. "!type": "fn(message: string)",
  815. "prototype": "Error.prototype"
  816. },
  817. "ReferenceError": {
  818. "!type": "fn(message: string)",
  819. "prototype": "Error.prototype"
  820. },
  821. "URIError": {
  822. "!type": "fn(message: string)",
  823. "prototype": "Error.prototype"
  824. },
  825. "EvalError": {
  826. "!type": "fn(message: string)",
  827. "prototype": "Error.prototype"
  828. },
  829. "RangeError": {
  830. "!type": "fn(message: string)",
  831. "prototype": "Error.prototype"
  832. },
  833. "TypeError": {
  834. "!type": "fn(message: string)",
  835. "prototype": "Error.prototype"
  836. },
  837. "parseInt": {
  838. "!type": "fn(string: string, radix?: number) -> number"
  839. },
  840. "parseFloat": {
  841. "!type": "fn(string: string) -> number"
  842. },
  843. "isNaN": {
  844. "!type": "fn(value: number) -> bool"
  845. },
  846. "isFinite": {
  847. "!type": "fn(value: number) -> bool"
  848. },
  849. "eval": {
  850. "!type": "fn(code: string) -> ?"
  851. },
  852. "encodeURI": {
  853. "!type": "fn(uri: string) -> string"
  854. },
  855. "encodeURIComponent": {
  856. "!type": "fn(uri: string) -> string"
  857. },
  858. "decodeURI": {
  859. "!type": "fn(uri: string) -> string"
  860. },
  861. "decodeURIComponent": {
  862. "!type": "fn(uri: string) -> string"
  863. },
  864. "Math": {
  865. "E": {
  866. "!type": "number"
  867. },
  868. "LN2": {
  869. "!type": "number"
  870. },
  871. "LN10": {
  872. "!type": "number"
  873. },
  874. "LOG2E": {
  875. "!type": "number"
  876. },
  877. "LOG10E": {
  878. "!type": "number"
  879. },
  880. "SQRT1_2": {
  881. "!type": "number"
  882. },
  883. "SQRT2": {
  884. "!type": "number"
  885. },
  886. "PI": {
  887. "!type": "number"
  888. },
  889. "abs": {
  890. "!type": "fn(number) -> number"
  891. },
  892. "cos": {
  893. "!type": "fn(number) -> number"
  894. },
  895. "sin": {
  896. "!type": "fn(number) -> number"
  897. },
  898. "tan": {
  899. "!type": "fn(number) -> number"
  900. },
  901. "acos": {
  902. "!type": "fn(number) -> number"
  903. },
  904. "asin": {
  905. "!type": "fn(number) -> number"
  906. },
  907. "atan": {
  908. "!type": "fn(number) -> number"
  909. },
  910. "atan2": {
  911. "!type": "fn(y: number, x: number) -> number"
  912. },
  913. "ceil": {
  914. "!type": "fn(number) -> number"
  915. },
  916. "floor": {
  917. "!type": "fn(number) -> number"
  918. },
  919. "round": {
  920. "!type": "fn(number) -> number"
  921. },
  922. "exp": {
  923. "!type": "fn(number) -> number"
  924. },
  925. "log": {
  926. "!type": "fn(number) -> number"
  927. },
  928. "sqrt": {
  929. "!type": "fn(number) -> number"
  930. },
  931. "pow": {
  932. "!type": "fn(number, number) -> number"
  933. },
  934. "max": {
  935. "!type": "fn(number, number) -> number"
  936. },
  937. "min": {
  938. "!type": "fn(number, number) -> number"
  939. },
  940. "random": {
  941. "!type": "fn() -> number"
  942. },
  943. "acosh": {
  944. "!type": "fn(x: number) -> number"
  945. },
  946. "asinh": {
  947. "!type": "fn(x: number) -> number"
  948. },
  949. "atanh": {
  950. "!type": "fn(x: number) -> number"
  951. },
  952. "cbrt": {
  953. "!type": "fn(x: number) -> number"
  954. },
  955. "clz32": {
  956. "!type": "fn(x: number) -> number"
  957. },
  958. "cosh": {
  959. "!type": "fn(x: number) -> number"
  960. },
  961. "expm1": {
  962. "!type": "fn(x: number) -> number"
  963. },
  964. "fround": {
  965. "!type": "fn(x: number) -> number"
  966. },
  967. "hypot": {
  968. "!type": "fn(value: number) -> number"
  969. },
  970. "imul": {
  971. "!type": "fn(a: number, b: number) -> number"
  972. },
  973. "log10": {
  974. "!type": "fn(x: number) -> number"
  975. },
  976. "log1p": {
  977. "!type": "fn(x: number) -> number"
  978. },
  979. "log2": {
  980. "!type": "fn(x: number) -> number"
  981. },
  982. "sign": {
  983. "!type": "fn(x: number) -> number"
  984. },
  985. "sinh": {
  986. "!type": "fn(x: number) -> number"
  987. },
  988. "tanh": {
  989. "!type": "fn(x: number) -> number"
  990. },
  991. "trunc": {
  992. "!type": "fn(x: number) -> number"
  993. }
  994. },
  995. "JSON": {
  996. "parse": {
  997. "!type": "fn(json: string, reviver?: fn(key: string, value: ?) -> ?) -> ?"
  998. },
  999. "stringify": {
  1000. "!type": "fn(value: ?, replacer?: fn(key: string, value: ?) -> ?, space?: string|number) -> string"
  1001. }
  1002. },
  1003. "ArrayBuffer": {
  1004. "!type": "fn(length: number)",
  1005. "isView": {
  1006. "!type": "fn(arg: +ArrayBuffer) -> bool"
  1007. },
  1008. "prototype": {
  1009. "byteLength": {
  1010. "!type": "number"
  1011. },
  1012. "slice": {
  1013. "!type": "fn(begin: number, end?: number) -> +ArrayBuffer"
  1014. }
  1015. }
  1016. },
  1017. "DataView": {
  1018. "!type": "fn(buffer: +ArrayBuffer, byteOffset?: number, byteLength?: number)",
  1019. "prototype": {
  1020. "buffer": {
  1021. "!type": "+ArrayBuffer"
  1022. },
  1023. "byteLength": {
  1024. "!type": "number"
  1025. },
  1026. "byteOffset": {
  1027. "!type": "number"
  1028. },
  1029. "getFloat32": {
  1030. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1031. },
  1032. "getFloat64": {
  1033. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1034. },
  1035. "getInt16": {
  1036. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1037. },
  1038. "getInt32": {
  1039. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1040. },
  1041. "getInt8": {
  1042. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1043. },
  1044. "getUint16": {
  1045. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1046. },
  1047. "getUint32": {
  1048. "!type": "fn(byteOffset: number, littleEndian?: bool) -> number"
  1049. },
  1050. "getUint8": {
  1051. "!type": "fn(byteOffset: number) -> number"
  1052. },
  1053. "setFloat32": {
  1054. "!type": "fn(byteOffset: number, value: number, littleEndian?: bool)"
  1055. },
  1056. "setFloat64": {
  1057. "!type": "fn(byteOffset: number, value: number, littleEndian?: bool)"
  1058. },
  1059. "setInt16": {
  1060. "!type": "fn(byteOffset: number, value: number, littleEndian?: bool)"
  1061. },
  1062. "setInt32": {
  1063. "!type": "fn(byteOffset: number, value: number, littleEndian?: bool)"
  1064. },
  1065. "setInt8": {
  1066. "!type": "fn(byteOffset: number, value: number)"
  1067. },
  1068. "setUint16": {
  1069. "!type": "fn(byteOffset: number, value: number, littleEndian?: bool)"
  1070. },
  1071. "setUint32": {
  1072. "!type": "fn(byteOffset: number, value: number, littleEndian?: bool)"
  1073. },
  1074. "setUint8": {
  1075. "!type": "fn(byteOffset: number, value: number)"
  1076. }
  1077. }
  1078. },
  1079. "Float32Array": "TypedArray",
  1080. "Float64Array": "TypedArray",
  1081. "Int16Array": "TypedArray",
  1082. "Int32Array": "TypedArray",
  1083. "Int8Array": "TypedArray",
  1084. "Map": {
  1085. "!type": "fn(iterable?: [?])",
  1086. "prototype": {
  1087. "clear": {
  1088. "!type": "fn()"
  1089. },
  1090. "delete": {
  1091. "!type": "fn(key: ?)"
  1092. },
  1093. "entries": {
  1094. "!type": "fn() -> +iter[:t=[!this.:key, !this.:value]]"
  1095. },
  1096. "forEach": {
  1097. "!type": "fn(callback: fn(value: ?, key: ?, map: +Map), thisArg?: ?)",
  1098. "!effects": ["call !0 this=!1 !this.:value !this.:key !this"]
  1099. },
  1100. "get": {
  1101. "!type": "fn(key: ?) -> !this.:value"
  1102. },
  1103. "has": {
  1104. "!type": "fn(key: ?) -> bool"
  1105. },
  1106. "keys": {
  1107. "!type": "fn() -> +iter[:t=!this.:key]"
  1108. },
  1109. "set": {
  1110. "!type": "fn(key: ?, value: ?) -> !this",
  1111. "!effects": ["propagate !0 !this.:key", "propagate !1 !this.:value"]
  1112. },
  1113. "size": {
  1114. "!type": "number"
  1115. },
  1116. "values": {
  1117. "!type": "fn() -> +iter[:t=!this.:value]"
  1118. },
  1119. ":Symbol.iterator": {
  1120. "!type": "fn() -> +iter[:t=[!this.:key, !this.:value]]"
  1121. }
  1122. }
  1123. },
  1124. "Promise": {
  1125. "!type": "fn(executor: fn(resolve: fn(value: ?), reject: fn(reason: ?))) -> !custom:Promise_ctor",
  1126. "all": {
  1127. "!type": "fn(iterable: [+Promise]) -> +Promise[:t=[!0.<i>.:t]]"
  1128. },
  1129. "race": {
  1130. "!type": "fn(iterable: [+Promise]) -> !0.<i>"
  1131. },
  1132. "reject": "Promise_reject",
  1133. "resolve": {
  1134. "!type": "fn(value: ?) -> !custom:Promise_resolve"
  1135. },
  1136. "prototype": "Promise.prototype"
  1137. },
  1138. "Proxy": {
  1139. "!type": "fn(target: ?, handler: Proxy_handler)",
  1140. "revocable": {
  1141. "!type": "fn(target: ?, handler: Proxy_handler) -> Proxy_revocable"
  1142. }
  1143. },
  1144. "Reflect": {
  1145. "apply": {
  1146. "!type": "fn(target: fn(), thisArg?: ?, argumentList?: [?]) -> !0.!ret"
  1147. },
  1148. "construct": {
  1149. "!type": "fn(target: fn(), argumentList?: [?]) -> ?"
  1150. },
  1151. "defineProperty": {
  1152. "!type": "fn(target: ?, property: string, descriptor: propertyDescriptor) -> bool"
  1153. },
  1154. "deleteProperty": {
  1155. "!type": "fn(target: ?, property: string) -> bool"
  1156. },
  1157. "enumerate": {
  1158. "!type": "fn(target: ?) -> +iter[:t=string]"
  1159. },
  1160. "get": {
  1161. "!type": "fn(target: ?, property: string) -> ?"
  1162. },
  1163. "getOwnPropertyDescriptor": {
  1164. "!type": "fn(target: ?, property: string) -> ?"
  1165. },
  1166. "getPrototypeOf": {
  1167. "!type": "fn(target: ?) -> ?"
  1168. },
  1169. "has": {
  1170. "!type": "fn(target: ?, property: string) -> bool"
  1171. },
  1172. "isExtensible": {
  1173. "!type": "fn(target: ?) -> bool"
  1174. },
  1175. "ownKeys": {
  1176. "!type": "fn(target: ?) -> [string]"
  1177. },
  1178. "preventExtensions": {
  1179. "!type": "fn(target: ?) -> bool"
  1180. },
  1181. "set": {
  1182. "!type": "fn(target: ?, property: string, value: ?) -> bool"
  1183. },
  1184. "setPrototypeOf": {
  1185. "!type": "fn(target: ?, prototype: ?) -> bool"
  1186. }
  1187. },
  1188. "Set": {
  1189. "!type": "fn(iterable?: [?])",
  1190. "prototype": {
  1191. "add": {
  1192. "!type": "fn(value: ?) -> !this",
  1193. "!effects": ["propagate !0 !this.:t"]
  1194. },
  1195. "clear": {
  1196. "!type": "fn()"
  1197. },
  1198. "delete": {
  1199. "!type": "fn(value: ?) -> bool"
  1200. },
  1201. "entries": {
  1202. "!type": "fn() -> +iter[:t=[!this.:t]]"
  1203. },
  1204. "forEach": {
  1205. "!type": "fn(callback: fn(value: ?, value2: ?, set: +Set), thisArg?: ?)",
  1206. "!effects": ["call !0 this=!1 !this.:t number !this"]
  1207. },
  1208. "has": {
  1209. "!type": "fn(value: ?) -> bool"
  1210. },
  1211. "keys": {
  1212. "!type": "fn() -> +iter[:t=!this.:t]"
  1213. },
  1214. "size": {
  1215. "!type": "number"
  1216. },
  1217. "values": {
  1218. "!type": "fn() -> +iter[:t=!this.:t]"
  1219. },
  1220. ":Symbol.iterator": {
  1221. "!type": "fn() -> +iter[:t=!this.:t]"
  1222. }
  1223. }
  1224. },
  1225. "Symbol": {
  1226. "!type": "fn(description?: string) -> !custom:getSymbol",
  1227. "for": {
  1228. "!type": "fn(key: string) -> !custom:getSymbol"
  1229. },
  1230. "keyFor": {
  1231. "!type": "fn(sym: +Symbol) -> string"
  1232. },
  1233. "hasInstance": ":Symbol.hasInstance",
  1234. "isConcatSpreadable": ":Symbol.isConcatSpreadable",
  1235. "iterator": ":Symbol.iterator",
  1236. "asyncIterator": ":Symbol.asyncIterator",
  1237. "match": ":Symbol.match",
  1238. "replace": ":Symbol.replace",
  1239. "search": ":Symbol.search",
  1240. "species": ":Symbol.species",
  1241. "split": ":Symbol.split",
  1242. "toStringTag": ":Symbol.toStringTag",
  1243. "unscopables": ":Symbol.unscopables",
  1244. "prototype": {
  1245. "!stdProto": "Symbol"
  1246. }
  1247. },
  1248. "Uint16Array": "TypedArray",
  1249. "Uint32Array": "TypedArray",
  1250. "Uint8Array": "TypedArray",
  1251. "Uint8ClampedArray": "TypedArray",
  1252. "WeakMap": {
  1253. "!type": "fn(iterable?: [?])",
  1254. "prototype": {
  1255. "delete": {
  1256. "!type": "fn(key: ?) -> bool"
  1257. },
  1258. "get": {
  1259. "!type": "fn(key: ?) -> !this.:value"
  1260. },
  1261. "has": {
  1262. "!type": "fn(key: ?) -> bool"
  1263. },
  1264. "set": {
  1265. "!type": "fn(key: ?, value: ?)",
  1266. "!effects": ["propagate !0 !this.:key", "propagate !1 !this.:value"]
  1267. }
  1268. }
  1269. },
  1270. "WeakSet": {
  1271. "!type": "fn(iterable?: [?])",
  1272. "prototype": {
  1273. "add": {
  1274. "!type": "fn(value: ?)"
  1275. },
  1276. "delete": {
  1277. "!type": "fn(value: ?) -> bool"
  1278. },
  1279. "has": {
  1280. "!type": "fn(value: ?) -> bool"
  1281. }
  1282. }
  1283. }
  1284. }