commit
8e95493b8e
155 changed files with 829361 additions and 0 deletions
@ -0,0 +1,2 @@ |
|||||||
|
.idea |
||||||
|
.env |
@ -0,0 +1,6 @@ |
|||||||
|
{ |
||||||
|
"display_name": "Toornament Teams", |
||||||
|
"info_text": "Small tool for creating multi op.gg links for teams in Toornament", |
||||||
|
"visible": true, |
||||||
|
"tags": ["Tool"] |
||||||
|
} |
@ -0,0 +1 @@ |
|||||||
|
data/scripts/js |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 318 B |
@ -0,0 +1,45 @@ |
|||||||
|
<?php |
||||||
|
$endpoint = $_POST['endpoint']; |
||||||
|
|
||||||
|
$header = ""; |
||||||
|
|
||||||
|
if (isset($_POST['headers'])){ |
||||||
|
$wanted_headers = $_POST['headers']; |
||||||
|
foreach ($wanted_headers as $key => $value) { |
||||||
|
$header .= "$key: $value\r\n"; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
$api_key = parse_ini_file("../../../.env")['API_KEY']; |
||||||
|
|
||||||
|
$opts = [ |
||||||
|
"http" => [ |
||||||
|
"method" => "GET", |
||||||
|
"header" => "X-Api-Key: $api_key\r\n$header" |
||||||
|
] |
||||||
|
]; |
||||||
|
|
||||||
|
$context = stream_context_create($opts); |
||||||
|
|
||||||
|
$result = @file_get_contents("https://api.toornament.com/$endpoint", false, $context); |
||||||
|
if (!$result){ |
||||||
|
echo false; |
||||||
|
} else { |
||||||
|
$real_size = false; |
||||||
|
foreach ($http_response_header as $item){ |
||||||
|
$pattern = "#Content-Range: [a-z]+ [0-9]+\-[0-9]+/([0-9]+)#"; |
||||||
|
if (preg_match($pattern, $item, $re) == 1){ |
||||||
|
$real_size = $re[1]; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
if (is_numeric($real_size)){ |
||||||
|
$array = json_decode($result); |
||||||
|
$object = new stdClass(); |
||||||
|
$object->items = $array; |
||||||
|
$object->real_size = $real_size; |
||||||
|
echo json_encode($object); |
||||||
|
} else { |
||||||
|
echo $result; |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,18 @@ |
|||||||
|
'use strict'; |
||||||
|
|
||||||
|
function eventsSetup(){ |
||||||
|
p.keyPressed = () => { |
||||||
|
switch (p.keyCode){ |
||||||
|
//Ctrl + D
|
||||||
|
case 68: |
||||||
|
if (p.keyIsDown(17)){ |
||||||
|
debug = !debug; |
||||||
|
let msg = 'Debug mode turned ' + (debug ? 'ON' : 'OFF'); |
||||||
|
console.info(msg); |
||||||
|
return false; |
||||||
|
} |
||||||
|
break; |
||||||
|
|
||||||
|
} |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,58 @@ |
|||||||
|
'use strict'; |
||||||
|
|
||||||
|
let debug = false, |
||||||
|
font: any, |
||||||
|
settings: any; |
||||||
|
|
||||||
|
let antiCacheQuery = '?_=' + new Date().getTime(); |
||||||
|
|
||||||
|
const p = new p5((p: p5) => { |
||||||
|
|
||||||
|
p.preload = () => { |
||||||
|
settings = p.loadJSON('data/settings/settings.json' + antiCacheQuery, {}, 'json', (json: any) => { |
||||||
|
console.log('Local settings loaded: ', json); |
||||||
|
}, (error: any) => { |
||||||
|
console.log('Local settings failed: ', error); |
||||||
|
}); |
||||||
|
|
||||||
|
font = p.loadFont('data/styles/fonts/Tajawal/Tajawal-Regular.ttf' + antiCacheQuery, (font: any) => { |
||||||
|
console.log('Local font loaded: ', font); |
||||||
|
}, (error: any) => { |
||||||
|
console.log('Local font failed: ', error); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
p.setup = () => { |
||||||
|
canvasSetup(); |
||||||
|
eventsSetup(); |
||||||
|
loadDynamicScripts().then(async () => { |
||||||
|
for (let id of settings.tournaments){ |
||||||
|
try{ |
||||||
|
let tournament = await fetchTournament(id); |
||||||
|
$('#tournament-list').append(tournament.teaserHtml); |
||||||
|
} catch(e){ |
||||||
|
console.info('Cannot fetch internal tournament with id ' + id + ": " + e); |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
function canvasSetup(){ |
||||||
|
p.noCanvas(); |
||||||
|
} |
||||||
|
|
||||||
|
async function loadDynamicScripts(){ |
||||||
|
const json = await p.httpGet('data/settings/libraries.json' + antiCacheQuery, 'json') as Object; |
||||||
|
let requests = []; |
||||||
|
for (let script in json) { |
||||||
|
if (json[script]) { |
||||||
|
let url = '/lib/benjocraeft/' + script + '.js'; |
||||||
|
requests.push($.getScript(url, () => { |
||||||
|
console.log('Successfully loaded script: ', url); |
||||||
|
})); |
||||||
|
} |
||||||
|
} |
||||||
|
await $.when(...requests); |
||||||
|
console.log('All dynamic scripts have been loaded!'); |
||||||
|
} |
@ -0,0 +1,122 @@ |
|||||||
|
"use strict"; |
||||||
|
|
||||||
|
function openTournament(tournament: Tournament){ |
||||||
|
$('#tournament-selection > button').attr('disabled', 'disabled'); |
||||||
|
//Enable Loading gif
|
||||||
|
|
||||||
|
tournament.fetchTeams().then(() => { |
||||||
|
tournament.buildMainHtml(); |
||||||
|
|
||||||
|
$('#tournament-selection').hide(); |
||||||
|
//Disable Loading gif
|
||||||
|
|
||||||
|
$('#tournament-teams').show(); |
||||||
|
}, e => { |
||||||
|
console.error('Cant fetch teams', e); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function openTournamentWithId(){ |
||||||
|
$('#tournament-selection > button').attr('disabled', 'disabled'); |
||||||
|
let id = $('#tournament-selection > input[name=id]').val() as string; |
||||||
|
fetchTournament(id).then(openTournament, goBackToSelection); |
||||||
|
} |
||||||
|
|
||||||
|
function goBackToSelection(){ |
||||||
|
$('#tournament-teams').hide(); |
||||||
|
|
||||||
|
$('#tournament-selection > button').attr('disabled', null); |
||||||
|
$('#tournament-selection').show(); |
||||||
|
} |
||||||
|
|
||||||
|
let delay = (() => { |
||||||
|
let timer = 0; |
||||||
|
return function(callback, ms){ |
||||||
|
clearTimeout(timer); |
||||||
|
// @ts-ignore
|
||||||
|
timer = setTimeout(callback, ms); |
||||||
|
}; |
||||||
|
})(); |
||||||
|
|
||||||
|
function filterFromSearch(element){ |
||||||
|
let query = element.value.toLowerCase(); |
||||||
|
|
||||||
|
$('.team-teaser').each(function() { |
||||||
|
let name = this.getElementsByTagName("span")[0].textContent.toLowerCase(); |
||||||
|
if (name.indexOf(query) != -1){ |
||||||
|
$(this).show(); |
||||||
|
} else { |
||||||
|
$(this).hide(); |
||||||
|
} |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
async function fetchTournament(id: string){ |
||||||
|
return new Tournament(await APICall("viewer/v2/tournaments/" + id)); |
||||||
|
} |
||||||
|
|
||||||
|
function APICall(endpoint: string, parameters?: Object, headers?: Object){ |
||||||
|
|
||||||
|
if (parameters){ |
||||||
|
endpoint += "?"; |
||||||
|
for (let key in parameters){ |
||||||
|
endpoint += key + "=" + parameters[key] + "&"; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
return new Promise((resolve: (value: Object) => void, reject) => { |
||||||
|
$.get({ |
||||||
|
url: "data/php/api_request.php", |
||||||
|
method: "POST", |
||||||
|
data: { |
||||||
|
endpoint: endpoint, |
||||||
|
headers: headers |
||||||
|
} |
||||||
|
}).done((data, result, request) => { |
||||||
|
if (!data){ |
||||||
|
reject('API Call failed at endpoint ' + endpoint); |
||||||
|
} else { |
||||||
|
try{ |
||||||
|
resolve(JSON.parse(data)); |
||||||
|
} catch (e) { |
||||||
|
reject('Failed to resolve API response at endpoint ' + endpoint + ' \nReason: ' + e); |
||||||
|
} |
||||||
|
} |
||||||
|
}); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
function fallbackCopyTextToClipboard(text) { |
||||||
|
let textArea = document.createElement("textarea"); |
||||||
|
textArea.value = text; |
||||||
|
|
||||||
|
// Avoid scrolling to bottom
|
||||||
|
textArea.style.top = "0"; |
||||||
|
textArea.style.left = "0"; |
||||||
|
textArea.style.position = "fixed"; |
||||||
|
|
||||||
|
document.body.appendChild(textArea); |
||||||
|
textArea.focus(); |
||||||
|
textArea.select(); |
||||||
|
|
||||||
|
try { |
||||||
|
let successful = document.execCommand('copy'); |
||||||
|
let msg = successful ? 'successful' : 'unsuccessful'; |
||||||
|
console.log('Fallback: Copying text command was ' + msg); |
||||||
|
} catch (err) { |
||||||
|
console.error('Fallback: Oops, unable to copy', err); |
||||||
|
} |
||||||
|
|
||||||
|
document.body.removeChild(textArea); |
||||||
|
} |
||||||
|
function copyTextToClipboard(text) { |
||||||
|
if (!navigator.clipboard) { |
||||||
|
fallbackCopyTextToClipboard(text); |
||||||
|
return; |
||||||
|
} |
||||||
|
navigator.clipboard.writeText(text).then(function() { |
||||||
|
console.log('Async: Copying to clipboard was successful!'); |
||||||
|
}, function(err) { |
||||||
|
console.error('Async: Could not copy text: ', err); |
||||||
|
}); |
||||||
|
} |
@ -0,0 +1,88 @@ |
|||||||
|
class Team{ |
||||||
|
|
||||||
|
id: string |
||||||
|
name: string |
||||||
|
lineup: Player[] |
||||||
|
|
||||||
|
constructor(rawData: Object) { |
||||||
|
for (let key in rawData){ |
||||||
|
this[key] = rawData[key]; |
||||||
|
} |
||||||
|
this.lineup = []; |
||||||
|
for (let p of rawData['lineup']){ |
||||||
|
if (p['name']){ |
||||||
|
this.lineup.push(new Player(p)); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
buildMainHtml(){ |
||||||
|
let team = $('#team'); |
||||||
|
team.html(''); |
||||||
|
|
||||||
|
for (let player of this.lineup){ |
||||||
|
team.append(player.teaserHtml); |
||||||
|
} |
||||||
|
team.append('<hr>'); |
||||||
|
|
||||||
|
let link = $('<a>Open Multi op.gg Link</a>'); |
||||||
|
link.attr('href', this.opggLink); |
||||||
|
link.attr('target', '_blank'); |
||||||
|
team.append(link); |
||||||
|
} |
||||||
|
|
||||||
|
get teaserHtml(){ |
||||||
|
let logo = $('<img alt="">'); |
||||||
|
let src = ""; |
||||||
|
if (this['custom_fields']['logo']) |
||||||
|
src = this['custom_fields']['logo']['logo_small']; |
||||||
|
logo.attr("src", src); |
||||||
|
|
||||||
|
let teamTeaser = $('<div></div>'); |
||||||
|
teamTeaser.attr('class', 'team-teaser'); |
||||||
|
teamTeaser.append(logo); |
||||||
|
teamTeaser.append('<span>' + this.name + '</span>'); |
||||||
|
teamTeaser.on('click', () => { |
||||||
|
this.buildMainHtml(); |
||||||
|
$('.team-teaser').css('border-color', ''); |
||||||
|
teamTeaser.css('border-color', '#26ac39'); |
||||||
|
}); |
||||||
|
|
||||||
|
return teamTeaser; |
||||||
|
} |
||||||
|
|
||||||
|
get opggLink(){ |
||||||
|
let link = 'https://euw.op.gg/multi/query='; |
||||||
|
for (let player of this.lineup){ |
||||||
|
link += this.formatForLink(player.summoner_name) + '%2C'; |
||||||
|
} |
||||||
|
return link; |
||||||
|
} |
||||||
|
|
||||||
|
formatForLink(name: string){ |
||||||
|
return name.replace(/\s+/g, ''); |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
|
|
||||||
|
class Player{ |
||||||
|
|
||||||
|
name: string |
||||||
|
summoner_name: string |
||||||
|
|
||||||
|
constructor(rawData: Object) { |
||||||
|
this.name = rawData['name']; |
||||||
|
this.summoner_name = rawData['custom_fields']['summoner_name']; |
||||||
|
if (!this.summoner_name) |
||||||
|
this.summoner_name = this.name; |
||||||
|
} |
||||||
|
|
||||||
|
get teaserHtml(){ |
||||||
|
let playerTeaser = $('<div></div>'); |
||||||
|
playerTeaser.attr('class', 'player-teaser'); |
||||||
|
playerTeaser.text(this.summoner_name); |
||||||
|
|
||||||
|
return playerTeaser; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,81 @@ |
|||||||
|
class Tournament{ |
||||||
|
|
||||||
|
id: string |
||||||
|
name: string |
||||||
|
full_name: string |
||||||
|
status: string |
||||||
|
logo: Object |
||||||
|
organization: string |
||||||
|
description: string |
||||||
|
size: number |
||||||
|
|
||||||
|
teams: Team[] = [] |
||||||
|
|
||||||
|
isLoading: boolean |
||||||
|
|
||||||
|
constructor(data: Object) { |
||||||
|
for (let key in data){ |
||||||
|
this[key] = data[key]; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
async fetchTeams(){ |
||||||
|
this.isLoading = true; |
||||||
|
this.teams = []; |
||||||
|
let list = []; |
||||||
|
for (let i = 0, size = Infinity; i < size; i += 50){ |
||||||
|
let range = i + '-' + (i + 49); |
||||||
|
try { |
||||||
|
let result = await APICall( |
||||||
|
'viewer/v2/tournaments/' + this.id + '/participants', |
||||||
|
{sort: 'alphabetic'}, |
||||||
|
{Range: 'participants=' + range} |
||||||
|
); |
||||||
|
size = result['real_size']; |
||||||
|
list = list.concat(result['items']); |
||||||
|
} catch (e){ |
||||||
|
console.info('Failed to fetch teams ' + range + ':', e); |
||||||
|
} |
||||||
|
} |
||||||
|
for (let item of list){ |
||||||
|
this.teams.push(new Team(item)); |
||||||
|
} |
||||||
|
this.isLoading = false; |
||||||
|
} |
||||||
|
|
||||||
|
buildMainHtml(){ |
||||||
|
let teamsList = $('#teams-list'); |
||||||
|
teamsList.html(''); |
||||||
|
$('#team').html(''); |
||||||
|
|
||||||
|
let name = this.full_name; |
||||||
|
name = !name ? this.name : name; |
||||||
|
$('#tournament-teams > h2').text(name); |
||||||
|
|
||||||
|
for (let team of this.teams){ |
||||||
|
teamsList.append(team.teaserHtml); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
get teaserHtml(){ |
||||||
|
let html = $('<div></div>'); |
||||||
|
html.attr('class', 'tournament-teaser'); |
||||||
|
html.on('click', () => !this.isLoading ? openTournament(this) : null); |
||||||
|
html.data('id', this.id); |
||||||
|
|
||||||
|
let logo = $('<img alt="">') |
||||||
|
logo.attr('src', this.logo ? this.logo['logo_small'] : ""); |
||||||
|
logo.on('load', () => html.show()); |
||||||
|
|
||||||
|
let name = $('<span></span>'); |
||||||
|
name.text(this.name); |
||||||
|
|
||||||
|
if (logo.attr('src')) |
||||||
|
html.hide(); |
||||||
|
html.append(logo, name); |
||||||
|
|
||||||
|
return html; |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
@ -0,0 +1,7 @@ |
|||||||
|
{ |
||||||
|
"collision": false, |
||||||
|
"colorPicker": false, |
||||||
|
"cookie": false, |
||||||
|
"prototypes": false, |
||||||
|
"technical": false |
||||||
|
} |
@ -0,0 +1,16 @@ |
|||||||
|
{ |
||||||
|
"project": { |
||||||
|
"name": "toornament_teams", |
||||||
|
"author": "BenjoCraeft", |
||||||
|
"version": "0.0.0", |
||||||
|
"playerCounts": [] |
||||||
|
}, |
||||||
|
"tournaments": [ |
||||||
|
"6034398746468909056", |
||||||
|
"5512903139207847936", |
||||||
|
"4979183735686701056", |
||||||
|
"4396538753679925248", |
||||||
|
"3848209563225554944", |
||||||
|
"3349885157485182976" |
||||||
|
] |
||||||
|
} |
@ -0,0 +1,88 @@ |
|||||||
|
#color_picker{ |
||||||
|
width: 300px; |
||||||
|
height: 25%; |
||||||
|
margin: 20px; |
||||||
|
margin-top: 50px; |
||||||
|
border: 5px solid #000; |
||||||
|
background-color: #000; |
||||||
|
-webkit-user-select: none; |
||||||
|
-moz-user-select: none; |
||||||
|
-ms-user-select: none; |
||||||
|
user-select: none; |
||||||
|
position: relative; |
||||||
|
} |
||||||
|
#color_picker_numeric{ |
||||||
|
width: 80%; |
||||||
|
padding: 5%; |
||||||
|
margin: 5%; |
||||||
|
background-color: #888; |
||||||
|
border-radius: 10px; |
||||||
|
overflow: hidden; |
||||||
|
} |
||||||
|
.color_picker_rgb{ |
||||||
|
float: left; |
||||||
|
width: 22%; |
||||||
|
height: 35px; |
||||||
|
font-size: 25px; |
||||||
|
color: #000; |
||||||
|
} |
||||||
|
.color_picker_rgb:nth-child(1){ |
||||||
|
margin-right: 10%; |
||||||
|
margin-left: 3%; |
||||||
|
background-color: #F00; |
||||||
|
|
||||||
|
} |
||||||
|
.color_picker_rgb:nth-child(2){ |
||||||
|
background-color: #0F0; |
||||||
|
} |
||||||
|
.color_picker_rgb:nth-child(3){ |
||||||
|
margin-left: 10%; |
||||||
|
background-color: #00F; |
||||||
|
color: #FFF; |
||||||
|
} |
||||||
|
#color_picker_hex{ |
||||||
|
width: 50%; |
||||||
|
height: 30px; |
||||||
|
font-size: 25px; |
||||||
|
margin: 10% 25% 0 25%; |
||||||
|
} |
||||||
|
#saturation{ |
||||||
|
position: relative; |
||||||
|
width: calc(100% - 33px); |
||||||
|
height: 100%; |
||||||
|
background: linear-gradient(to right, #FFF 0%, #F00 100%); |
||||||
|
float: left; |
||||||
|
margin-right: 6px; |
||||||
|
} |
||||||
|
#value { |
||||||
|
width: 100%; |
||||||
|
height: 100%; |
||||||
|
background: linear-gradient(to top, #000 0%, rgba(255,255,255,0) 100%); |
||||||
|
} |
||||||
|
#sb_picker{ |
||||||
|
border: 2px solid; |
||||||
|
border-color: #FFF; |
||||||
|
position: absolute; |
||||||
|
width: 14px; |
||||||
|
height: 14px; |
||||||
|
border-radius: 10px; |
||||||
|
bottom: 50px; |
||||||
|
left: 50px; |
||||||
|
box-sizing: border-box; |
||||||
|
z-index: 10; |
||||||
|
} |
||||||
|
#hue { |
||||||
|
width: 27px; |
||||||
|
height: 100%; |
||||||
|
position: relative; |
||||||
|
float: left; |
||||||
|
background: linear-gradient(to bottom, #F00 0%, #F0F 17%, #00F 34%, #0FF 50%, #0F0 67%, #FF0 84%, #F00 100%); |
||||||
|
} |
||||||
|
#hue_picker { |
||||||
|
position: absolute; |
||||||
|
background: #000; |
||||||
|
border-bottom: 1px solid #000; |
||||||
|
top: 0; |
||||||
|
width: 27px; |
||||||
|
height: 2px; |
||||||
|
} |
Binary file not shown.
@ -0,0 +1,93 @@ |
|||||||
|
Copyright 2018 Boutros International. (https://www.boutrosfonts.com) |
||||||
|
|
||||||
|
This Font Software is licensed under the SIL Open Font License, Version 1.1. |
||||||
|
This license is copied below, and is also available with a FAQ at: |
||||||
|
https://scripts.sil.org/OFL |
||||||
|
|
||||||
|
|
||||||
|
----------------------------------------------------------- |
||||||
|
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 |
||||||
|
----------------------------------------------------------- |
||||||
|
|
||||||
|
PREAMBLE |
||||||
|
The goals of the Open Font License (OFL) are to stimulate worldwide |
||||||
|
development of collaborative font projects, to support the font creation |
||||||
|
efforts of academic and linguistic communities, and to provide a free and |
||||||
|
open framework in which fonts may be shared and improved in partnership |
||||||
|
with others. |
||||||
|
|
||||||
|
The OFL allows the licensed fonts to be used, studied, modified and |
||||||
|
redistributed freely as long as they are not sold by themselves. The |
||||||
|
fonts, including any derivative works, can be bundled, embedded, |
||||||
|
redistributed and/or sold with any software provided that any reserved |
||||||
|
names are not used by derivative works. The fonts and derivatives, |
||||||
|
however, cannot be released under any other type of license. The |
||||||
|
requirement for fonts to remain under this license does not apply |
||||||
|
to any document created using the fonts or their derivatives. |
||||||
|
|
||||||
|
DEFINITIONS |
||||||
|
"Font Software" refers to the set of files released by the Copyright |
||||||
|
Holder(s) under this license and clearly marked as such. This may |
||||||
|
include source files, build scripts and documentation. |
||||||
|
|
||||||
|
"Reserved Font Name" refers to any names specified as such after the |
||||||
|
copyright statement(s). |
||||||
|
|
||||||
|
"Original Version" refers to the collection of Font Software components as |
||||||
|
distributed by the Copyright Holder(s). |
||||||
|
|
||||||
|
"Modified Version" refers to any derivative made by adding to, deleting, |
||||||
|
or substituting -- in part or in whole -- any of the components of the |
||||||
|
Original Version, by changing formats or by porting the Font Software to a |
||||||
|
new environment. |
||||||
|
|
||||||
|
"Author" refers to any designer, engineer, programmer, technical |
||||||
|
writer or other person who contributed to the Font Software. |
||||||
|
|
||||||
|
PERMISSION & CONDITIONS |
||||||
|
Permission is hereby granted, free of charge, to any person obtaining |
||||||
|
a copy of the Font Software, to use, study, copy, merge, embed, modify, |
||||||
|
redistribute, and sell modified and unmodified copies of the Font |
||||||
|
Software, subject to the following conditions: |
||||||
|
|
||||||
|
1) Neither the Font Software nor any of its individual components, |
||||||
|
in Original or Modified Versions, may be sold by itself. |
||||||
|
|
||||||
|
2) Original or Modified Versions of the Font Software may be bundled, |
||||||
|
redistributed and/or sold with any software, provided that each copy |
||||||
|
contains the above copyright notice and this license. These can be |
||||||
|
included either as stand-alone text files, human-readable headers or |
||||||
|
in the appropriate machine-readable metadata fields within text or |
||||||
|
binary files as long as those fields can be easily viewed by the user. |
||||||
|
|
||||||
|
3) No Modified Version of the Font Software may use the Reserved Font |
||||||
|
Name(s) unless explicit written permission is granted by the corresponding |
||||||
|
Copyright Holder. This restriction only applies to the primary font name as |
||||||
|
presented to the users. |
||||||
|
|
||||||
|
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font |
||||||
|
Software shall not be used to promote, endorse or advertise any |
||||||
|
Modified Version, except to acknowledge the contribution(s) of the |
||||||
|
Copyright Holder(s) and the Author(s) or with their explicit written |
||||||
|
permission. |
||||||
|
|
||||||
|
5) The Font Software, modified or unmodified, in part or in whole, |
||||||
|
must be distributed entirely under this license, and must not be |
||||||
|
distributed under any other license. The requirement for fonts to |
||||||
|
remain under this license does not apply to any document created |
||||||
|
using the Font Software. |
||||||
|
|
||||||
|
TERMINATION |
||||||
|
This license becomes null and void if any of the above conditions are |
||||||
|
not met. |
||||||
|
|
||||||
|
DISCLAIMER |
||||||
|
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, |
||||||
|
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF |
||||||
|
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT |
||||||
|
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE |
||||||
|
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, |
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL |
||||||
|
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
||||||
|
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM |
||||||
|
OTHER DEALINGS IN THE FONT SOFTWARE. |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,89 @@ |
|||||||
|
input[type=range] { |
||||||
|
-webkit-appearance: none; |
||||||
|
margin: 18px 0; |
||||||
|
width: 100%; |
||||||
|
background: none; |
||||||
|
} |
||||||
|
input[type=range]:focus { |
||||||
|
outline: none; |
||||||
|
} |
||||||
|
input[type=range]::-webkit-slider-runnable-track { |
||||||
|
width: 100%; |
||||||
|
height: 8.4px; |
||||||
|
cursor: pointer; |
||||||
|
animate: 0.2s; |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
background: #3071a9; |
||||||
|
border-radius: 1.3px; |
||||||
|
border: 0.2px solid #010101; |
||||||
|
} |
||||||
|
input[type=range]::-webkit-slider-thumb { |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
border: 1px solid #000000; |
||||||
|
height: 36px; |
||||||
|
width: 16px; |
||||||
|
border-radius: 3px; |
||||||
|
background: #ffffff; |
||||||
|
cursor: pointer; |
||||||
|
-webkit-appearance: none; |
||||||
|
margin-top: -14px; |
||||||
|
} |
||||||
|
input[type=range]:focus::-webkit-slider-runnable-track { |
||||||
|
background: #367ebd; |
||||||
|
} |
||||||
|
input[type=range]::-moz-range-track { |
||||||
|
width: 100%; |
||||||
|
height: 8.4px; |
||||||
|
cursor: pointer; |
||||||
|
animate: 0.2s; |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
background: #3071a9; |
||||||
|
border-radius: 1.3px; |
||||||
|
border: 0.2px solid #010101; |
||||||
|
} |
||||||
|
input[type=range]::-moz-range-thumb { |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
border: 1px solid #000000; |
||||||
|
height: 36px; |
||||||
|
width: 16px; |
||||||
|
border-radius: 3px; |
||||||
|
background: #ffffff; |
||||||
|
cursor: pointer; |
||||||
|
} |
||||||
|
input[type=range]::-ms-track { |
||||||
|
width: 100%; |
||||||
|
height: 8.4px; |
||||||
|
cursor: pointer; |
||||||
|
animate: 0.2s; |
||||||
|
background: transparent; |
||||||
|
border-color: transparent; |
||||||
|
border-width: 16px 0; |
||||||
|
color: transparent; |
||||||
|
} |
||||||
|
input[type=range]::-ms-fill-lower { |
||||||
|
background: #2a6495; |
||||||
|
border: 0.2px solid #010101; |
||||||
|
border-radius: 2.6px; |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
} |
||||||
|
input[type=range]::-ms-fill-upper { |
||||||
|
background: #3071a9; |
||||||
|
border: 0.2px solid #010101; |
||||||
|
border-radius: 2.6px; |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
} |
||||||
|
input[type=range]::-ms-thumb { |
||||||
|
box-shadow: 1px 1px 1px #000000, 0px 0px 1px #0d0d0d; |
||||||
|
border: 1px solid #000000; |
||||||
|
height: 36px; |
||||||
|
width: 16px; |
||||||
|
border-radius: 3px; |
||||||
|
background: #ffffff; |
||||||
|
cursor: pointer; |
||||||
|
} |
||||||
|
input[type=range]:focus::-ms-fill-lower { |
||||||
|
background: #3071a9; |
||||||
|
} |
||||||
|
input[type=range]:focus::-ms-fill-upper { |
||||||
|
background: #367ebd; |
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html lang="en"> |
||||||
|
<head> |
||||||
|
<meta charset="utf-8"> |
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.6.0/p5.min.js" type="text/javascript"></script> |
||||||
|
<script src="https://code.jquery.com/jquery-3.6.4.min.js" type="text/javascript"></script> |
||||||
|
<script src="data/scripts/js/main.js" type="text/javascript"></script> |
||||||
|
<link href="styles.css" rel="stylesheet"> |
||||||
|
<link href="data/styles/color_picker.css" rel="stylesheet"> |
||||||
|
<link href="data/styles/range_input.css" rel="stylesheet"> |
||||||
|
<title>Toornament Teams</title> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<div id="p5_loading"></div> |
||||||
|
<a href="https://www.toornament.com"> |
||||||
|
<img src="data/images/PoweredbyToor_White.png" style="position: absolute; bottom: 0; right: 0;"> |
||||||
|
</a> |
||||||
|
<header><h1>Toornament Teams</h1> |
||||||
|
</header> |
||||||
|
<div id="tournament-selection"> |
||||||
|
<h2>Select a Tournament or enter ID</h2> |
||||||
|
<input name="id" placeholder="Enter Tournament ID here" type="number"/> |
||||||
|
<button onclick="openTournamentWithId(this);">Open ID</button> |
||||||
|
<br> |
||||||
|
<div id="tournament-list"></div> |
||||||
|
</div> |
||||||
|
<div id="tournament-teams" style="display: none;"> |
||||||
|
<button onclick="goBackToSelection();">Select another tournament</button> |
||||||
|
<h2></h2> |
||||||
|
<label> |
||||||
|
<input id="search_field" type="text" onkeyup="delay(() => filterFromSearch(this), 100)"/> |
||||||
|
</label> |
||||||
|
<div id="teams-list"></div> |
||||||
|
<div id="team"></div> |
||||||
|
</div> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1 @@ |
|||||||
|
../typescript/bin/tsc |
@ -0,0 +1 @@ |
|||||||
|
../typescript/bin/tsserver |
@ -0,0 +1,36 @@ |
|||||||
|
{ |
||||||
|
"name": "toornament-teams", |
||||||
|
"version": "1.0.0", |
||||||
|
"lockfileVersion": 2, |
||||||
|
"requires": true, |
||||||
|
"packages": { |
||||||
|
"node_modules/@types/jquery": { |
||||||
|
"version": "3.5.16", |
||||||
|
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.16.tgz", |
||||||
|
"integrity": "sha512-bsI7y4ZgeMkmpG9OM710RRzDFp+w4P1RGiIt30C1mSBT+ExCleeh4HObwgArnDFELmRrOpXgSYN9VF1hj+f1lw==", |
||||||
|
"dev": true, |
||||||
|
"dependencies": { |
||||||
|
"@types/sizzle": "*" |
||||||
|
} |
||||||
|
}, |
||||||
|
"node_modules/@types/sizzle": { |
||||||
|
"version": "2.3.3", |
||||||
|
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.3.tgz", |
||||||
|
"integrity": "sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ==", |
||||||
|
"dev": true |
||||||
|
}, |
||||||
|
"node_modules/typescript": { |
||||||
|
"version": "5.0.2", |
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz", |
||||||
|
"integrity": "sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw==", |
||||||
|
"dev": true, |
||||||
|
"bin": { |
||||||
|
"tsc": "bin/tsc", |
||||||
|
"tsserver": "bin/tsserver" |
||||||
|
}, |
||||||
|
"engines": { |
||||||
|
"node": ">=12.20" |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@ |
|||||||
|
MIT License |
||||||
|
|
||||||
|
Copyright (c) Microsoft Corporation. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||||
|
of this software and associated documentation files (the "Software"), to deal |
||||||
|
in the Software without restriction, including without limitation the rights |
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||||
|
copies of the Software, and to permit persons to whom the Software is |
||||||
|
furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all |
||||||
|
copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||||
|
SOFTWARE |
@ -0,0 +1,16 @@ |
|||||||
|
# Installation |
||||||
|
> `npm install --save @types/jquery` |
||||||
|
|
||||||
|
# Summary |
||||||
|
This package contains type definitions for jquery (https://jquery.com). |
||||||
|
|
||||||
|
# Details |
||||||
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery. |
||||||
|
|
||||||
|
### Additional Details |
||||||
|
* Last updated: Sat, 31 Dec 2022 10:02:59 GMT |
||||||
|
* Dependencies: [@types/sizzle](https://npmjs.com/package/@types/sizzle) |
||||||
|
* Global values: `$`, `Symbol`, `jQuery` |
||||||
|
|
||||||
|
# Credits |
||||||
|
These definitions were written by [Leonard Thieu](https://github.com/leonard-thieu), [Boris Yankov](https://github.com/borisyankov), [Christian Hoffmeister](https://github.com/choffmeister), [Steve Fenton](https://github.com/Steve-Fenton), [Diullei Gomes](https://github.com/Diullei), [Tass Iliopoulos](https://github.com/tasoili), [Sean Hill](https://github.com/seanski), [Guus Goossens](https://github.com/Guuz), [Kelly Summerlin](https://github.com/ksummerlin), [Basarat Ali Syed](https://github.com/basarat), [Nicholas Wolverson](https://github.com/nwolverson), [Derek Cicerone](https://github.com/derekcicerone), [Andrew Gaspar](https://github.com/AndrewGaspar), [Seikichi Kondo](https://github.com/seikichi), [Benjamin Jackman](https://github.com/benjaminjackman), [Josh Strobl](https://github.com/JoshStrobl), [John Reilly](https://github.com/johnnyreilly), [Dick van den Brink](https://github.com/DickvdBrink), [Thomas Schulz](https://github.com/King2500), [Terry Mun](https://github.com/terrymun), [Martin Badin](https://github.com/martin-badin), and [Chris Frewin](https://github.com/princefishthrower). |
@ -0,0 +1,3 @@ |
|||||||
|
/// <reference types="jquery" />
|
||||||
|
|
||||||
|
export = jQuery; |
@ -0,0 +1,34 @@ |
|||||||
|
// Type definitions for jquery 3.5
|
||||||
|
// Project: https://jquery.com
|
||||||
|
// Definitions by: Leonard Thieu <https://github.com/leonard-thieu>
|
||||||
|
// Boris Yankov <https://github.com/borisyankov>
|
||||||
|
// Christian Hoffmeister <https://github.com/choffmeister>
|
||||||
|
// Steve Fenton <https://github.com/Steve-Fenton>
|
||||||
|
// Diullei Gomes <https://github.com/Diullei>
|
||||||
|
// Tass Iliopoulos <https://github.com/tasoili>
|
||||||
|
// Sean Hill <https://github.com/seanski>
|
||||||
|
// Guus Goossens <https://github.com/Guuz>
|
||||||
|
// Kelly Summerlin <https://github.com/ksummerlin>
|
||||||
|
// Basarat Ali Syed <https://github.com/basarat>
|
||||||
|
// Nicholas Wolverson <https://github.com/nwolverson>
|
||||||
|
// Derek Cicerone <https://github.com/derekcicerone>
|
||||||
|
// Andrew Gaspar <https://github.com/AndrewGaspar>
|
||||||
|
// Seikichi Kondo <https://github.com/seikichi>
|
||||||
|
// Benjamin Jackman <https://github.com/benjaminjackman>
|
||||||
|
// Josh Strobl <https://github.com/JoshStrobl>
|
||||||
|
// John Reilly <https://github.com/johnnyreilly>
|
||||||
|
// Dick van den Brink <https://github.com/DickvdBrink>
|
||||||
|
// Thomas Schulz <https://github.com/King2500>
|
||||||
|
// Terry Mun <https://github.com/terrymun>
|
||||||
|
// Martin Badin <https://github.com/martin-badin>
|
||||||
|
// Chris Frewin <https://github.com/princefishthrower>
|
||||||
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||||
|
// TypeScript Version: 2.7
|
||||||
|
|
||||||
|
/// <reference types="sizzle" />
|
||||||
|
/// <reference path="JQueryStatic.d.ts" />
|
||||||
|
/// <reference path="JQuery.d.ts" />
|
||||||
|
/// <reference path="misc.d.ts" />
|
||||||
|
/// <reference path="legacy.d.ts" />
|
||||||
|
|
||||||
|
export = jQuery; |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,132 @@ |
|||||||
|
{ |
||||||
|
"name": "@types/jquery", |
||||||
|
"version": "3.5.16", |
||||||
|
"description": "TypeScript definitions for jquery", |
||||||
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jquery", |
||||||
|
"license": "MIT", |
||||||
|
"contributors": [ |
||||||
|
{ |
||||||
|
"name": "Leonard Thieu", |
||||||
|
"url": "https://github.com/leonard-thieu", |
||||||
|
"githubUsername": "leonard-thieu" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Boris Yankov", |
||||||
|
"url": "https://github.com/borisyankov", |
||||||
|
"githubUsername": "borisyankov" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Christian Hoffmeister", |
||||||
|
"url": "https://github.com/choffmeister", |
||||||
|
"githubUsername": "choffmeister" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Steve Fenton", |
||||||
|
"url": "https://github.com/Steve-Fenton", |
||||||
|
"githubUsername": "Steve-Fenton" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Diullei Gomes", |
||||||
|
"url": "https://github.com/Diullei", |
||||||
|
"githubUsername": "Diullei" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Tass Iliopoulos", |
||||||
|
"url": "https://github.com/tasoili", |
||||||
|
"githubUsername": "tasoili" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Sean Hill", |
||||||
|
"url": "https://github.com/seanski", |
||||||
|
"githubUsername": "seanski" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Guus Goossens", |
||||||
|
"url": "https://github.com/Guuz", |
||||||
|
"githubUsername": "Guuz" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Kelly Summerlin", |
||||||
|
"url": "https://github.com/ksummerlin", |
||||||
|
"githubUsername": "ksummerlin" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Basarat Ali Syed", |
||||||
|
"url": "https://github.com/basarat", |
||||||
|
"githubUsername": "basarat" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Nicholas Wolverson", |
||||||
|
"url": "https://github.com/nwolverson", |
||||||
|
"githubUsername": "nwolverson" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Derek Cicerone", |
||||||
|
"url": "https://github.com/derekcicerone", |
||||||
|
"githubUsername": "derekcicerone" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Andrew Gaspar", |
||||||
|
"url": "https://github.com/AndrewGaspar", |
||||||
|
"githubUsername": "AndrewGaspar" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Seikichi Kondo", |
||||||
|
"url": "https://github.com/seikichi", |
||||||
|
"githubUsername": "seikichi" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Benjamin Jackman", |
||||||
|
"url": "https://github.com/benjaminjackman", |
||||||
|
"githubUsername": "benjaminjackman" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Josh Strobl", |
||||||
|
"url": "https://github.com/JoshStrobl", |
||||||
|
"githubUsername": "JoshStrobl" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "John Reilly", |
||||||
|
"url": "https://github.com/johnnyreilly", |
||||||
|
"githubUsername": "johnnyreilly" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Dick van den Brink", |
||||||
|
"url": "https://github.com/DickvdBrink", |
||||||
|
"githubUsername": "DickvdBrink" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Thomas Schulz", |
||||||
|
"url": "https://github.com/King2500", |
||||||
|
"githubUsername": "King2500" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Terry Mun", |
||||||
|
"url": "https://github.com/terrymun", |
||||||
|
"githubUsername": "terrymun" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Martin Badin", |
||||||
|
"url": "https://github.com/martin-badin", |
||||||
|
"githubUsername": "martin-badin" |
||||||
|
}, |
||||||
|
{ |
||||||
|
"name": "Chris Frewin", |
||||||
|
"url": "https://github.com/princefishthrower", |
||||||
|
"githubUsername": "princefishthrower" |
||||||
|
} |
||||||
|
], |
||||||
|
"main": "", |
||||||
|
"types": "index.d.ts", |
||||||
|
"repository": { |
||||||
|
"type": "git", |
||||||
|
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", |
||||||
|
"directory": "types/jquery" |
||||||
|
}, |
||||||
|
"scripts": {}, |
||||||
|
"dependencies": { |
||||||
|
"@types/sizzle": "*" |
||||||
|
}, |
||||||
|
"typesPublisherContentHash": "7923f2efc7a0ecc41cc3b3587756b1fa3918d741e8e8782f9988e908d19a0b66", |
||||||
|
"typeScriptVersion": "4.2" |
||||||
|
} |
@ -0,0 +1,21 @@ |
|||||||
|
MIT License |
||||||
|
|
||||||
|
Copyright (c) Microsoft Corporation. |
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy |
||||||
|
of this software and associated documentation files (the "Software"), to deal |
||||||
|
in the Software without restriction, including without limitation the rights |
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
||||||
|
copies of the Software, and to permit persons to whom the Software is |
||||||
|
furnished to do so, subject to the following conditions: |
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all |
||||||
|
copies or substantial portions of the Software. |
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
||||||
|
SOFTWARE |
@ -0,0 +1,16 @@ |
|||||||
|
# Installation |
||||||
|
> `npm install --save @types/sizzle` |
||||||
|
|
||||||
|
# Summary |
||||||
|
This package contains type definitions for sizzle (https://sizzlejs.com). |
||||||
|
|
||||||
|
# Details |
||||||
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sizzle. |
||||||
|
|
||||||
|
### Additional Details |
||||||
|
* Last updated: Tue, 27 Apr 2021 12:31:24 GMT |
||||||
|
* Dependencies: none |
||||||
|
* Global values: `Sizzle` |
||||||
|
|
||||||
|
# Credits |
||||||
|
These definitions were written by [Leonard Thieu](https://github.com/leonard-thieu). |
@ -0,0 +1,92 @@ |
|||||||
|
// Type definitions for sizzle 2.3
|
||||||
|
// Project: https://sizzlejs.com
|
||||||
|
// Definitions by: Leonard Thieu <https://github.com/leonard-thieu>
|
||||||
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||||
|
// TypeScript Version: 2.3
|
||||||
|
|
||||||
|
export as namespace Sizzle; |
||||||
|
|
||||||
|
declare const Sizzle: SizzleStatic; |
||||||
|
export = Sizzle; |
||||||
|
|
||||||
|
interface SizzleStatic { |
||||||
|
selectors: Sizzle.Selectors; |
||||||
|
<TArrayLike extends ArrayLike<Element>>(selector: string, context: Element | Document | DocumentFragment, results: TArrayLike): TArrayLike; |
||||||
|
(selector: string, context?: Element | Document | DocumentFragment): Element[]; |
||||||
|
// tslint:disable-next-line:ban-types
|
||||||
|
compile(selector: string): Function; |
||||||
|
matchesSelector(element: Element, selector: string): boolean; |
||||||
|
matches(selector: string, elements: Element[]): Element[]; |
||||||
|
} |
||||||
|
|
||||||
|
declare namespace Sizzle { |
||||||
|
interface Selectors { |
||||||
|
cacheLength: number; |
||||||
|
match: Selectors.Matches; |
||||||
|
find: Selectors.FindFunctions; |
||||||
|
preFilter: Selectors.PreFilterFunctions; |
||||||
|
filter: Selectors.FilterFunctions; |
||||||
|
attrHandle: Selectors.AttrHandleFunctions; |
||||||
|
pseudos: Selectors.PseudoFunctions; |
||||||
|
setFilters: Selectors.SetFilterFunctions; |
||||||
|
createPseudo(fn: Selectors.CreatePseudoFunction): Selectors.PseudoFunction; |
||||||
|
} |
||||||
|
|
||||||
|
namespace Selectors { |
||||||
|
interface Matches { |
||||||
|
[name: string]: RegExp; |
||||||
|
} |
||||||
|
|
||||||
|
interface FindFunction { |
||||||
|
(match: RegExpMatchArray, context: Element | Document, isXML: boolean): Element[] | void; |
||||||
|
} |
||||||
|
|
||||||
|
interface FindFunctions { |
||||||
|
[name: string]: FindFunction; |
||||||
|
} |
||||||
|
|
||||||
|
interface PreFilterFunction { |
||||||
|
(match: RegExpMatchArray): string[]; |
||||||
|
} |
||||||
|
|
||||||
|
interface PreFilterFunctions { |
||||||
|
[name: string]: PreFilterFunction; |
||||||
|
} |
||||||
|
|
||||||
|
interface FilterFunction { |
||||||
|
(element: string, ...matches: string[]): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface FilterFunctions { |
||||||
|
[name: string]: FilterFunction; |
||||||
|
} |
||||||
|
|
||||||
|
interface AttrHandleFunction { |
||||||
|
(elem: any, casePreservedName: string, isXML: boolean): string; |
||||||
|
} |
||||||
|
|
||||||
|
interface AttrHandleFunctions { |
||||||
|
[name: string]: AttrHandleFunction; |
||||||
|
} |
||||||
|
|
||||||
|
interface PseudoFunction { |
||||||
|
(elem: Element): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface PseudoFunctions { |
||||||
|
[name: string]: PseudoFunction; |
||||||
|
} |
||||||
|
|
||||||
|
interface SetFilterFunction { |
||||||
|
(elements: Element[], argument: number, not: boolean): Element[]; |
||||||
|
} |
||||||
|
|
||||||
|
interface SetFilterFunctions { |
||||||
|
[name: string]: SetFilterFunction; |
||||||
|
} |
||||||
|
|
||||||
|
interface CreatePseudoFunction { |
||||||
|
(...args: any[]): PseudoFunction; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
{ |
||||||
|
"name": "@types/sizzle", |
||||||
|
"version": "2.3.3", |
||||||
|
"description": "TypeScript definitions for sizzle", |
||||||
|
"license": "MIT", |
||||||
|
"contributors": [ |
||||||
|
{ |
||||||
|
"name": "Leonard Thieu", |
||||||
|
"url": "https://github.com/leonard-thieu", |
||||||
|
"githubUsername": "leonard-thieu" |
||||||
|
} |
||||||
|
], |
||||||
|
"main": "", |
||||||
|
"types": "index.d.ts", |
||||||
|
"repository": { |
||||||
|
"type": "git", |
||||||
|
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", |
||||||
|
"directory": "types/sizzle" |
||||||
|
}, |
||||||
|
"scripts": {}, |
||||||
|
"dependencies": {}, |
||||||
|
"typesPublisherContentHash": "5a1ded78c310b52ad24992cf9fc8105049492a7c2b610dd99eca2030a0462045", |
||||||
|
"typeScriptVersion": "3.5" |
||||||
|
} |
@ -0,0 +1,55 @@ |
|||||||
|
Apache License |
||||||
|
|
||||||
|
Version 2.0, January 2004 |
||||||
|
|
||||||
|
http://www.apache.org/licenses/ |
||||||
|
|
||||||
|
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION |
||||||
|
|
||||||
|
1. Definitions. |
||||||
|
|
||||||
|
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. |
||||||
|
|
||||||
|
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. |
||||||
|
|
||||||
|
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. |
||||||
|
|
||||||
|
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. |
||||||
|
|
||||||
|
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. |
||||||
|
|
||||||
|
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. |
||||||
|
|
||||||
|
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). |
||||||
|
|
||||||
|
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. |
||||||
|
|
||||||
|
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." |
||||||
|
|
||||||
|
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. |
||||||
|
|
||||||
|
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. |
||||||
|
|
||||||
|
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. |
||||||
|
|
||||||
|
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: |
||||||
|
|
||||||
|
You must give any other recipients of the Work or Derivative Works a copy of this License; and |
||||||
|
|
||||||
|
You must cause any modified files to carry prominent notices stating that You changed the files; and |
||||||
|
|
||||||
|
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and |
||||||
|
|
||||||
|
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. |
||||||
|
|
||||||
|
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. |
||||||
|
|
||||||
|
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. |
||||||
|
|
||||||
|
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. |
||||||
|
|
||||||
|
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. |
||||||
|
|
||||||
|
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. |
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS |
@ -0,0 +1,49 @@ |
|||||||
|
|
||||||
|
# TypeScript |
||||||
|
|
||||||
|
[![GitHub Actions CI](https://github.com/microsoft/TypeScript/workflows/CI/badge.svg)](https://github.com/microsoft/TypeScript/actions?query=workflow%3ACI) |
||||||
|
[![Devops Build Status](https://dev.azure.com/typescript/TypeScript/_apis/build/status/Typescript/node10)](https://dev.azure.com/typescript/TypeScript/_build?definitionId=7) |
||||||
|
[![npm version](https://badge.fury.io/js/typescript.svg)](https://www.npmjs.com/package/typescript) |
||||||
|
[![Downloads](https://img.shields.io/npm/dm/typescript.svg)](https://www.npmjs.com/package/typescript) |
||||||
|
|
||||||
|
[TypeScript](https://www.typescriptlang.org/) is a language for application-scale JavaScript. TypeScript adds optional types to JavaScript that support tools for large-scale JavaScript applications for any browser, for any host, on any OS. TypeScript compiles to readable, standards-based JavaScript. Try it out at the [playground](https://www.typescriptlang.org/play/), and stay up to date via [our blog](https://blogs.msdn.microsoft.com/typescript) and [Twitter account](https://twitter.com/typescript). |
||||||
|
|
||||||
|
Find others who are using TypeScript at [our community page](https://www.typescriptlang.org/community/). |
||||||
|
|
||||||
|
## Installing |
||||||
|
|
||||||
|
For the latest stable version: |
||||||
|
|
||||||
|
```bash |
||||||
|
npm install -g typescript |
||||||
|
``` |
||||||
|
|
||||||
|
For our nightly builds: |
||||||
|
|
||||||
|
```bash |
||||||
|
npm install -g typescript@next |
||||||
|
``` |
||||||
|
|
||||||
|
## Contribute |
||||||
|
|
||||||
|
There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md) to TypeScript. |
||||||
|
* [Submit bugs](https://github.com/microsoft/TypeScript/issues) and help us verify fixes as they are checked in. |
||||||
|
* Review the [source code changes](https://github.com/microsoft/TypeScript/pulls). |
||||||
|
* Engage with other TypeScript users and developers on [StackOverflow](https://stackoverflow.com/questions/tagged/typescript). |
||||||
|
* Help each other in the [TypeScript Community Discord](https://discord.gg/typescript). |
||||||
|
* Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter. |
||||||
|
* [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/main/CONTRIBUTING.md). |
||||||
|
|
||||||
|
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see |
||||||
|
the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) |
||||||
|
with any additional questions or comments. |
||||||
|
|
||||||
|
## Documentation |
||||||
|
|
||||||
|
* [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) |
||||||
|
* [Programming handbook](https://www.typescriptlang.org/docs/handbook/intro.html) |
||||||
|
* [Homepage](https://www.typescriptlang.org/) |
||||||
|
|
||||||
|
## Roadmap |
||||||
|
|
||||||
|
For details on our planned features and future direction please refer to our [roadmap](https://github.com/microsoft/TypeScript/wiki/Roadmap). |
@ -0,0 +1,41 @@ |
|||||||
|
<!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK --> |
||||||
|
|
||||||
|
## Security |
||||||
|
|
||||||
|
Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/). |
||||||
|
|
||||||
|
If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://docs.microsoft.com/en-us/previous-versions/tn-archive/cc751383(v=technet.10)), please report it to us as described below. |
||||||
|
|
||||||
|
## Reporting Security Issues |
||||||
|
|
||||||
|
**Please do not report security vulnerabilities through public GitHub issues.** |
||||||
|
|
||||||
|
Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://msrc.microsoft.com/create-report). |
||||||
|
|
||||||
|
If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://www.microsoft.com/en-us/msrc/pgp-key-msrc). |
||||||
|
|
||||||
|
You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://www.microsoft.com/msrc). |
||||||
|
|
||||||
|
Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue: |
||||||
|
|
||||||
|
* Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.) |
||||||
|
* Full paths of source file(s) related to the manifestation of the issue |
||||||
|
* The location of the affected source code (tag/branch/commit or direct URL) |
||||||
|
* Any special configuration required to reproduce the issue |
||||||
|
* Step-by-step instructions to reproduce the issue |
||||||
|
* Proof-of-concept or exploit code (if possible) |
||||||
|
* Impact of the issue, including how an attacker might exploit the issue |
||||||
|
|
||||||
|
This information will help us triage your report more quickly. |
||||||
|
|
||||||
|
If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://microsoft.com/msrc/bounty) page for more details about our active programs. |
||||||
|
|
||||||
|
## Preferred Languages |
||||||
|
|
||||||
|
We prefer all communications to be in English. |
||||||
|
|
||||||
|
## Policy |
||||||
|
|
||||||
|
Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://www.microsoft.com/en-us/msrc/cvd). |
||||||
|
|
||||||
|
<!-- END MICROSOFT SECURITY.MD BLOCK --> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,2 @@ |
|||||||
|
#!/usr/bin/env node |
||||||
|
require('../lib/tsc.js') |
@ -0,0 +1,2 @@ |
|||||||
|
#!/usr/bin/env node |
||||||
|
require('../lib/tsserver.js') |
@ -0,0 +1,5 @@ |
|||||||
|
# Read This! |
||||||
|
|
||||||
|
**These files are not meant to be edited by hand.** |
||||||
|
If you need to make modifications, the respective files should be changed within the repository's top-level `src` directory. |
||||||
|
Running `hereby LKG` will then appropriately update the files in this directory. |
@ -0,0 +1,91 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
"use strict"; |
||||||
|
var __create = Object.create; |
||||||
|
var __defProp = Object.defineProperty; |
||||||
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; |
||||||
|
var __getOwnPropNames = Object.getOwnPropertyNames; |
||||||
|
var __getProtoOf = Object.getPrototypeOf; |
||||||
|
var __hasOwnProp = Object.prototype.hasOwnProperty; |
||||||
|
var __copyProps = (to, from, except, desc) => { |
||||||
|
if (from && typeof from === "object" || typeof from === "function") { |
||||||
|
for (let key of __getOwnPropNames(from)) |
||||||
|
if (!__hasOwnProp.call(to, key) && key !== except) |
||||||
|
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); |
||||||
|
} |
||||||
|
return to; |
||||||
|
}; |
||||||
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( |
||||||
|
// If the importer is in node compatibility mode or this is not an ESM
|
||||||
|
// file that has been converted to a CommonJS file using a Babel-
|
||||||
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
||||||
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
||||||
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, |
||||||
|
mod |
||||||
|
)); |
||||||
|
|
||||||
|
// src/cancellationToken/cancellationToken.ts
|
||||||
|
var fs = __toESM(require("fs")); |
||||||
|
function pipeExists(name) { |
||||||
|
return fs.existsSync(name); |
||||||
|
} |
||||||
|
function createCancellationToken(args) { |
||||||
|
let cancellationPipeName; |
||||||
|
for (let i = 0; i < args.length - 1; i++) { |
||||||
|
if (args[i] === "--cancellationPipeName") { |
||||||
|
cancellationPipeName = args[i + 1]; |
||||||
|
break; |
||||||
|
} |
||||||
|
} |
||||||
|
if (!cancellationPipeName) { |
||||||
|
return { |
||||||
|
isCancellationRequested: () => false, |
||||||
|
setRequest: (_requestId) => void 0, |
||||||
|
resetRequest: (_requestId) => void 0 |
||||||
|
}; |
||||||
|
} |
||||||
|
if (cancellationPipeName.charAt(cancellationPipeName.length - 1) === "*") { |
||||||
|
const namePrefix = cancellationPipeName.slice(0, -1); |
||||||
|
if (namePrefix.length === 0 || namePrefix.indexOf("*") >= 0) { |
||||||
|
throw new Error("Invalid name for template cancellation pipe: it should have length greater than 2 characters and contain only one '*'."); |
||||||
|
} |
||||||
|
let perRequestPipeName; |
||||||
|
let currentRequestId; |
||||||
|
return { |
||||||
|
isCancellationRequested: () => perRequestPipeName !== void 0 && pipeExists(perRequestPipeName), |
||||||
|
setRequest(requestId) { |
||||||
|
currentRequestId = requestId; |
||||||
|
perRequestPipeName = namePrefix + requestId; |
||||||
|
}, |
||||||
|
resetRequest(requestId) { |
||||||
|
if (currentRequestId !== requestId) { |
||||||
|
throw new Error(`Mismatched request id, expected ${currentRequestId}, actual ${requestId}`); |
||||||
|
} |
||||||
|
perRequestPipeName = void 0; |
||||||
|
} |
||||||
|
}; |
||||||
|
} else { |
||||||
|
return { |
||||||
|
isCancellationRequested: () => pipeExists(cancellationPipeName), |
||||||
|
// TODO: GH#18217
|
||||||
|
setRequest: (_requestId) => void 0, |
||||||
|
resetRequest: (_requestId) => void 0 |
||||||
|
}; |
||||||
|
} |
||||||
|
} |
||||||
|
module.exports = createCancellationToken; |
||||||
|
//# sourceMappingURL=cancellationToken.js.map
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,22 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es5" />
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
/// <reference lib="webworker.importscripts" />
|
||||||
|
/// <reference lib="scripthost" />
|
@ -0,0 +1,372 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/** |
||||||
|
* The decorator context types provided to class element decorators. |
||||||
|
*/ |
||||||
|
type ClassMemberDecoratorContext = |
||||||
|
| ClassMethodDecoratorContext |
||||||
|
| ClassGetterDecoratorContext |
||||||
|
| ClassSetterDecoratorContext |
||||||
|
| ClassFieldDecoratorContext |
||||||
|
| ClassAccessorDecoratorContext |
||||||
|
; |
||||||
|
|
||||||
|
/** |
||||||
|
* The decorator context types provided to any decorator. |
||||||
|
*/ |
||||||
|
type DecoratorContext = |
||||||
|
| ClassDecoratorContext |
||||||
|
| ClassMemberDecoratorContext |
||||||
|
; |
||||||
|
|
||||||
|
/** |
||||||
|
* Context provided to a class decorator. |
||||||
|
* @template Class The type of the decorated class associated with this context. |
||||||
|
*/ |
||||||
|
interface ClassDecoratorContext< |
||||||
|
Class extends abstract new (...args: any) => any = abstract new (...args: any) => any, |
||||||
|
> { |
||||||
|
/** The kind of element that was decorated. */ |
||||||
|
readonly kind: "class"; |
||||||
|
|
||||||
|
/** The name of the decorated class. */ |
||||||
|
readonly name: string | undefined; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a callback to be invoked after the class definition has been finalized. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* ```ts
|
||||||
|
* function customElement(name: string): ClassDecoratorFunction { |
||||||
|
* return (target, context) => { |
||||||
|
* context.addInitializer(function () { |
||||||
|
* customElements.define(name, this); |
||||||
|
* }); |
||||||
|
* } |
||||||
|
* } |
||||||
|
* |
||||||
|
* @customElement("my-element") |
||||||
|
* class MyElement {} |
||||||
|
* ``` |
||||||
|
*/ |
||||||
|
addInitializer(initializer: (this: Class) => void): void; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Context provided to a class method decorator. |
||||||
|
* @template This The type on which the class element will be defined. For a static class element, this will be |
||||||
|
* the type of the constructor. For a non-static class element, this will be the type of the instance. |
||||||
|
* @template Value The type of the decorated class method. |
||||||
|
*/ |
||||||
|
interface ClassMethodDecoratorContext< |
||||||
|
This = unknown, |
||||||
|
Value extends (this: This, ...args: any) => any = (this: This, ...args: any) => any, |
||||||
|
> { |
||||||
|
/** The kind of class element that was decorated. */ |
||||||
|
readonly kind: "method"; |
||||||
|
|
||||||
|
/** The name of the decorated class element. */ |
||||||
|
readonly name: string | symbol; |
||||||
|
|
||||||
|
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */ |
||||||
|
readonly static: boolean; |
||||||
|
|
||||||
|
/** A value indicating whether the class element has a private name. */ |
||||||
|
readonly private: boolean; |
||||||
|
|
||||||
|
/** An object that can be used to access the current value of the class element at runtime. */ |
||||||
|
readonly access: { |
||||||
|
/** |
||||||
|
* Determines whether an object has a property with the same name as the decorated element. |
||||||
|
*/ |
||||||
|
has(object: This): boolean; |
||||||
|
/** |
||||||
|
* Gets the current value of the method from the provided object. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* let fn = context.access.get(instance); |
||||||
|
*/ |
||||||
|
get(object: This): Value; |
||||||
|
}; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a callback to be invoked either before static initializers are run (when |
||||||
|
* decorating a `static` element), or before instance initializers are run (when |
||||||
|
* decorating a non-`static` element). |
||||||
|
* |
||||||
|
* @example |
||||||
|
* ```ts
|
||||||
|
* const bound: ClassMethodDecoratorFunction = (value, context) { |
||||||
|
* if (context.private) throw new TypeError("Not supported on private methods."); |
||||||
|
* context.addInitializer(function () { |
||||||
|
* this[context.name] = this[context.name].bind(this); |
||||||
|
* }); |
||||||
|
* } |
||||||
|
* |
||||||
|
* class C { |
||||||
|
* message = "Hello"; |
||||||
|
* |
||||||
|
* @bound |
||||||
|
* m() { |
||||||
|
* console.log(this.message); |
||||||
|
* } |
||||||
|
* } |
||||||
|
* ``` |
||||||
|
*/ |
||||||
|
addInitializer(initializer: (this: This) => void): void; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Context provided to a class getter decorator. |
||||||
|
* @template This The type on which the class element will be defined. For a static class element, this will be |
||||||
|
* the type of the constructor. For a non-static class element, this will be the type of the instance. |
||||||
|
* @template Value The property type of the decorated class getter. |
||||||
|
*/ |
||||||
|
interface ClassGetterDecoratorContext< |
||||||
|
This = unknown, |
||||||
|
Value = unknown, |
||||||
|
> { |
||||||
|
/** The kind of class element that was decorated. */ |
||||||
|
readonly kind: "getter"; |
||||||
|
|
||||||
|
/** The name of the decorated class element. */ |
||||||
|
readonly name: string | symbol; |
||||||
|
|
||||||
|
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */ |
||||||
|
readonly static: boolean; |
||||||
|
|
||||||
|
/** A value indicating whether the class element has a private name. */ |
||||||
|
readonly private: boolean; |
||||||
|
|
||||||
|
/** An object that can be used to access the current value of the class element at runtime. */ |
||||||
|
readonly access: { |
||||||
|
/** |
||||||
|
* Determines whether an object has a property with the same name as the decorated element. |
||||||
|
*/ |
||||||
|
has(object: This): boolean; |
||||||
|
/** |
||||||
|
* Invokes the getter on the provided object. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* let value = context.access.get(instance); |
||||||
|
*/ |
||||||
|
get(object: This): Value; |
||||||
|
}; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a callback to be invoked either before static initializers are run (when |
||||||
|
* decorating a `static` element), or before instance initializers are run (when |
||||||
|
* decorating a non-`static` element). |
||||||
|
*/ |
||||||
|
addInitializer(initializer: (this: This) => void): void; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Context provided to a class setter decorator. |
||||||
|
* @template This The type on which the class element will be defined. For a static class element, this will be |
||||||
|
* the type of the constructor. For a non-static class element, this will be the type of the instance. |
||||||
|
* @template Value The type of the decorated class setter. |
||||||
|
*/ |
||||||
|
interface ClassSetterDecoratorContext< |
||||||
|
This = unknown, |
||||||
|
Value = unknown, |
||||||
|
> { |
||||||
|
/** The kind of class element that was decorated. */ |
||||||
|
readonly kind: "setter"; |
||||||
|
|
||||||
|
/** The name of the decorated class element. */ |
||||||
|
readonly name: string | symbol; |
||||||
|
|
||||||
|
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */ |
||||||
|
readonly static: boolean; |
||||||
|
|
||||||
|
/** A value indicating whether the class element has a private name. */ |
||||||
|
readonly private: boolean; |
||||||
|
|
||||||
|
/** An object that can be used to access the current value of the class element at runtime. */ |
||||||
|
readonly access: { |
||||||
|
/** |
||||||
|
* Determines whether an object has a property with the same name as the decorated element. |
||||||
|
*/ |
||||||
|
has(object: This): boolean; |
||||||
|
/** |
||||||
|
* Invokes the setter on the provided object. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* context.access.set(instance, value); |
||||||
|
*/ |
||||||
|
set(object: This, value: Value): void; |
||||||
|
}; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a callback to be invoked either before static initializers are run (when |
||||||
|
* decorating a `static` element), or before instance initializers are run (when |
||||||
|
* decorating a non-`static` element). |
||||||
|
*/ |
||||||
|
addInitializer(initializer: (this: This) => void): void; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Context provided to a class `accessor` field decorator. |
||||||
|
* @template This The type on which the class element will be defined. For a static class element, this will be |
||||||
|
* the type of the constructor. For a non-static class element, this will be the type of the instance. |
||||||
|
* @template Value The type of decorated class field. |
||||||
|
*/ |
||||||
|
interface ClassAccessorDecoratorContext< |
||||||
|
This = unknown, |
||||||
|
Value = unknown, |
||||||
|
> { |
||||||
|
/** The kind of class element that was decorated. */ |
||||||
|
readonly kind: "accessor"; |
||||||
|
|
||||||
|
/** The name of the decorated class element. */ |
||||||
|
readonly name: string | symbol; |
||||||
|
|
||||||
|
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */ |
||||||
|
readonly static: boolean; |
||||||
|
|
||||||
|
/** A value indicating whether the class element has a private name. */ |
||||||
|
readonly private: boolean; |
||||||
|
|
||||||
|
/** An object that can be used to access the current value of the class element at runtime. */ |
||||||
|
readonly access: { |
||||||
|
/** |
||||||
|
* Determines whether an object has a property with the same name as the decorated element. |
||||||
|
*/ |
||||||
|
has(object: This): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Invokes the getter on the provided object. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* let value = context.access.get(instance); |
||||||
|
*/ |
||||||
|
get(object: This): Value; |
||||||
|
|
||||||
|
/** |
||||||
|
* Invokes the setter on the provided object. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* context.access.set(instance, value); |
||||||
|
*/ |
||||||
|
set(object: This, value: Value): void; |
||||||
|
}; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a callback to be invoked either before static initializers are run (when |
||||||
|
* decorating a `static` element), or before instance initializers are run (when |
||||||
|
* decorating a non-`static` element). |
||||||
|
*/ |
||||||
|
addInitializer(initializer: (this: This) => void): void; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Describes the target provided to class `accessor` field decorators. |
||||||
|
* @template This The `this` type to which the target applies. |
||||||
|
* @template Value The property type for the class `accessor` field. |
||||||
|
*/ |
||||||
|
interface ClassAccessorDecoratorTarget<This, Value> { |
||||||
|
/** |
||||||
|
* Invokes the getter that was defined prior to decorator application. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* let value = target.get.call(instance); |
||||||
|
*/ |
||||||
|
get(this: This): Value; |
||||||
|
|
||||||
|
/** |
||||||
|
* Invokes the setter that was defined prior to decorator application. |
||||||
|
* |
||||||
|
* @example |
||||||
|
* target.set.call(instance, value); |
||||||
|
*/ |
||||||
|
set(this: This, value: Value): void; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Describes the allowed return value from a class `accessor` field decorator. |
||||||
|
* @template This The `this` type to which the target applies. |
||||||
|
* @template Value The property type for the class `accessor` field. |
||||||
|
*/ |
||||||
|
interface ClassAccessorDecoratorResult<This, Value> { |
||||||
|
/** |
||||||
|
* An optional replacement getter function. If not provided, the existing getter function is used instead. |
||||||
|
*/ |
||||||
|
get?(this: This): Value; |
||||||
|
|
||||||
|
/** |
||||||
|
* An optional replacement setter function. If not provided, the existing setter function is used instead. |
||||||
|
*/ |
||||||
|
set?(this: This, value: Value): void; |
||||||
|
|
||||||
|
/** |
||||||
|
* An optional initializer mutator that is invoked when the underlying field initializer is evaluated. |
||||||
|
* @param value The incoming initializer value. |
||||||
|
* @returns The replacement initializer value. |
||||||
|
*/ |
||||||
|
init?(this: This, value: Value): Value; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* Context provided to a class field decorator. |
||||||
|
* @template This The type on which the class element will be defined. For a static class element, this will be |
||||||
|
* the type of the constructor. For a non-static class element, this will be the type of the instance. |
||||||
|
* @template Value The type of the decorated class field. |
||||||
|
*/ |
||||||
|
interface ClassFieldDecoratorContext< |
||||||
|
This = unknown, |
||||||
|
Value = unknown, |
||||||
|
> { |
||||||
|
/** The kind of class element that was decorated. */ |
||||||
|
readonly kind: "field"; |
||||||
|
|
||||||
|
/** The name of the decorated class element. */ |
||||||
|
readonly name: string | symbol; |
||||||
|
|
||||||
|
/** A value indicating whether the class element is a static (`true`) or instance (`false`) element. */ |
||||||
|
readonly static: boolean; |
||||||
|
|
||||||
|
/** A value indicating whether the class element has a private name. */ |
||||||
|
readonly private: boolean; |
||||||
|
|
||||||
|
/** An object that can be used to access the current value of the class element at runtime. */ |
||||||
|
readonly access: { |
||||||
|
/** |
||||||
|
* Determines whether an object has a property with the same name as the decorated element. |
||||||
|
*/ |
||||||
|
has(object: This): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Gets the value of the field on the provided object. |
||||||
|
*/ |
||||||
|
get(object: This): Value; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sets the value of the field on the provided object. |
||||||
|
*/ |
||||||
|
set(object: This, value: Value): void; |
||||||
|
}; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a callback to be invoked either before static initializers are run (when |
||||||
|
* decorating a `static` element), or before instance initializers are run (when |
||||||
|
* decorating a non-`static` element). |
||||||
|
*/ |
||||||
|
addInitializer(initializer: (this: This) => void): void; |
||||||
|
} |
@ -0,0 +1,22 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void; |
||||||
|
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void; |
||||||
|
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void; |
||||||
|
declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,353 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/////////////////////////////
|
||||||
|
/// Window Iterable APIs
|
||||||
|
/////////////////////////////
|
||||||
|
|
||||||
|
interface AudioParam { |
||||||
|
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam; |
||||||
|
} |
||||||
|
|
||||||
|
interface AudioParamMap extends ReadonlyMap<string, AudioParam> { |
||||||
|
} |
||||||
|
|
||||||
|
interface BaseAudioContext { |
||||||
|
createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode; |
||||||
|
createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave; |
||||||
|
} |
||||||
|
|
||||||
|
interface CSSKeyframesRule { |
||||||
|
[Symbol.iterator](): IterableIterator<CSSKeyframeRule>; |
||||||
|
} |
||||||
|
|
||||||
|
interface CSSRuleList { |
||||||
|
[Symbol.iterator](): IterableIterator<CSSRule>; |
||||||
|
} |
||||||
|
|
||||||
|
interface CSSStyleDeclaration { |
||||||
|
[Symbol.iterator](): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Cache { |
||||||
|
addAll(requests: Iterable<RequestInfo>): Promise<void>; |
||||||
|
} |
||||||
|
|
||||||
|
interface CanvasPath { |
||||||
|
roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable<number | DOMPointInit>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface CanvasPathDrawingStyles { |
||||||
|
setLineDash(segments: Iterable<number>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface DOMRectList { |
||||||
|
[Symbol.iterator](): IterableIterator<DOMRect>; |
||||||
|
} |
||||||
|
|
||||||
|
interface DOMStringList { |
||||||
|
[Symbol.iterator](): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface DOMTokenList { |
||||||
|
[Symbol.iterator](): IterableIterator<string>; |
||||||
|
entries(): IterableIterator<[number, string]>; |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
values(): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface DataTransferItemList { |
||||||
|
[Symbol.iterator](): IterableIterator<DataTransferItem>; |
||||||
|
} |
||||||
|
|
||||||
|
interface EventCounts extends ReadonlyMap<string, number> { |
||||||
|
} |
||||||
|
|
||||||
|
interface FileList { |
||||||
|
[Symbol.iterator](): IterableIterator<File>; |
||||||
|
} |
||||||
|
|
||||||
|
interface FontFaceSet extends Set<FontFace> { |
||||||
|
} |
||||||
|
|
||||||
|
interface FormData { |
||||||
|
[Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>; |
||||||
|
/** Returns an array of key, value pairs for every entry in the list. */ |
||||||
|
entries(): IterableIterator<[string, FormDataEntryValue]>; |
||||||
|
/** Returns a list of keys in the list. */ |
||||||
|
keys(): IterableIterator<string>; |
||||||
|
/** Returns a list of values in the list. */ |
||||||
|
values(): IterableIterator<FormDataEntryValue>; |
||||||
|
} |
||||||
|
|
||||||
|
interface HTMLAllCollection { |
||||||
|
[Symbol.iterator](): IterableIterator<Element>; |
||||||
|
} |
||||||
|
|
||||||
|
interface HTMLCollectionBase { |
||||||
|
[Symbol.iterator](): IterableIterator<Element>; |
||||||
|
} |
||||||
|
|
||||||
|
interface HTMLCollectionOf<T extends Element> { |
||||||
|
[Symbol.iterator](): IterableIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface HTMLFormElement { |
||||||
|
[Symbol.iterator](): IterableIterator<Element>; |
||||||
|
} |
||||||
|
|
||||||
|
interface HTMLSelectElement { |
||||||
|
[Symbol.iterator](): IterableIterator<HTMLOptionElement>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Headers { |
||||||
|
[Symbol.iterator](): IterableIterator<[string, string]>; |
||||||
|
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */ |
||||||
|
entries(): IterableIterator<[string, string]>; |
||||||
|
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */ |
||||||
|
keys(): IterableIterator<string>; |
||||||
|
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */ |
||||||
|
values(): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface IDBDatabase { |
||||||
|
/** Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. */ |
||||||
|
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction; |
||||||
|
} |
||||||
|
|
||||||
|
interface IDBObjectStore { |
||||||
|
/** |
||||||
|
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. |
||||||
|
* |
||||||
|
* Throws an "InvalidStateError" DOMException if not called within an upgrade transaction. |
||||||
|
*/ |
||||||
|
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex; |
||||||
|
} |
||||||
|
|
||||||
|
interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> { |
||||||
|
} |
||||||
|
|
||||||
|
interface MIDIOutput { |
||||||
|
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> { |
||||||
|
} |
||||||
|
|
||||||
|
interface MediaKeyStatusMap { |
||||||
|
[Symbol.iterator](): IterableIterator<[BufferSource, MediaKeyStatus]>; |
||||||
|
entries(): IterableIterator<[BufferSource, MediaKeyStatus]>; |
||||||
|
keys(): IterableIterator<BufferSource>; |
||||||
|
values(): IterableIterator<MediaKeyStatus>; |
||||||
|
} |
||||||
|
|
||||||
|
interface MediaList { |
||||||
|
[Symbol.iterator](): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface MessageEvent<T = any> { |
||||||
|
/** @deprecated */ |
||||||
|
initMessageEvent(type: string, bubbles?: boolean, cancelable?: boolean, data?: any, origin?: string, lastEventId?: string, source?: MessageEventSource | null, ports?: Iterable<MessagePort>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface MimeTypeArray { |
||||||
|
[Symbol.iterator](): IterableIterator<MimeType>; |
||||||
|
} |
||||||
|
|
||||||
|
interface NamedNodeMap { |
||||||
|
[Symbol.iterator](): IterableIterator<Attr>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Navigator { |
||||||
|
/** Available only in secure contexts. */ |
||||||
|
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>; |
||||||
|
vibrate(pattern: Iterable<number>): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface NodeList { |
||||||
|
[Symbol.iterator](): IterableIterator<Node>; |
||||||
|
/** Returns an array of key, value pairs for every entry in the list. */ |
||||||
|
entries(): IterableIterator<[number, Node]>; |
||||||
|
/** Returns an list of keys in the list. */ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** Returns an list of values in the list. */ |
||||||
|
values(): IterableIterator<Node>; |
||||||
|
} |
||||||
|
|
||||||
|
interface NodeListOf<TNode extends Node> { |
||||||
|
[Symbol.iterator](): IterableIterator<TNode>; |
||||||
|
/** Returns an array of key, value pairs for every entry in the list. */ |
||||||
|
entries(): IterableIterator<[number, TNode]>; |
||||||
|
/** Returns an list of keys in the list. */ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** Returns an list of values in the list. */ |
||||||
|
values(): IterableIterator<TNode>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Plugin { |
||||||
|
[Symbol.iterator](): IterableIterator<MimeType>; |
||||||
|
} |
||||||
|
|
||||||
|
interface PluginArray { |
||||||
|
[Symbol.iterator](): IterableIterator<Plugin>; |
||||||
|
} |
||||||
|
|
||||||
|
interface RTCRtpTransceiver { |
||||||
|
setCodecPreferences(codecs: Iterable<RTCRtpCodecCapability>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface RTCStatsReport extends ReadonlyMap<string, any> { |
||||||
|
} |
||||||
|
|
||||||
|
interface SVGLengthList { |
||||||
|
[Symbol.iterator](): IterableIterator<SVGLength>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SVGNumberList { |
||||||
|
[Symbol.iterator](): IterableIterator<SVGNumber>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SVGPointList { |
||||||
|
[Symbol.iterator](): IterableIterator<DOMPoint>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SVGStringList { |
||||||
|
[Symbol.iterator](): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SVGTransformList { |
||||||
|
[Symbol.iterator](): IterableIterator<SVGTransform>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SourceBufferList { |
||||||
|
[Symbol.iterator](): IterableIterator<SourceBuffer>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SpeechRecognitionResult { |
||||||
|
[Symbol.iterator](): IterableIterator<SpeechRecognitionAlternative>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SpeechRecognitionResultList { |
||||||
|
[Symbol.iterator](): IterableIterator<SpeechRecognitionResult>; |
||||||
|
} |
||||||
|
|
||||||
|
interface StyleSheetList { |
||||||
|
[Symbol.iterator](): IterableIterator<CSSStyleSheet>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SubtleCrypto { |
||||||
|
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; |
||||||
|
generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKeyPair>; |
||||||
|
generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; |
||||||
|
generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKeyPair | CryptoKey>; |
||||||
|
importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: ReadonlyArray<KeyUsage>): Promise<CryptoKey>; |
||||||
|
importKey(format: Exclude<KeyFormat, "jwk">, keyData: BufferSource, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; |
||||||
|
unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesGcmParams, unwrappedKeyAlgorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | AesKeyAlgorithm, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>; |
||||||
|
} |
||||||
|
|
||||||
|
interface TextTrackCueList { |
||||||
|
[Symbol.iterator](): IterableIterator<TextTrackCue>; |
||||||
|
} |
||||||
|
|
||||||
|
interface TextTrackList { |
||||||
|
[Symbol.iterator](): IterableIterator<TextTrack>; |
||||||
|
} |
||||||
|
|
||||||
|
interface TouchList { |
||||||
|
[Symbol.iterator](): IterableIterator<Touch>; |
||||||
|
} |
||||||
|
|
||||||
|
interface URLSearchParams { |
||||||
|
[Symbol.iterator](): IterableIterator<[string, string]>; |
||||||
|
/** Returns an array of key, value pairs for every entry in the search params. */ |
||||||
|
entries(): IterableIterator<[string, string]>; |
||||||
|
/** Returns a list of keys in the search params. */ |
||||||
|
keys(): IterableIterator<string>; |
||||||
|
/** Returns a list of values in the search params. */ |
||||||
|
values(): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface WEBGL_draw_buffers { |
||||||
|
drawBuffersWEBGL(buffers: Iterable<GLenum>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface WEBGL_multi_draw { |
||||||
|
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; |
||||||
|
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array | Iterable<GLint>, firstsOffset: GLuint, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, drawcount: GLsizei): void; |
||||||
|
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, instanceCountsList: Int32Array | Iterable<GLsizei>, instanceCountsOffset: GLuint, drawcount: GLsizei): void; |
||||||
|
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array | Iterable<GLsizei>, countsOffset: GLuint, type: GLenum, offsetsList: Int32Array | Iterable<GLsizei>, offsetsOffset: GLuint, drawcount: GLsizei): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface WebGL2RenderingContextBase { |
||||||
|
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: GLuint): void; |
||||||
|
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: GLuint): void; |
||||||
|
clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: GLuint): void; |
||||||
|
drawBuffers(buffers: Iterable<GLenum>): void; |
||||||
|
getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any; |
||||||
|
getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): Iterable<GLuint> | null; |
||||||
|
invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void; |
||||||
|
invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; |
||||||
|
transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void; |
||||||
|
uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void; |
||||||
|
vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface WebGL2RenderingContextOverloads { |
||||||
|
uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: GLuint, srcLength?: GLuint): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface WebGLRenderingContextBase { |
||||||
|
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void; |
||||||
|
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void; |
||||||
|
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void; |
||||||
|
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void; |
||||||
|
} |
||||||
|
|
||||||
|
interface WebGLRenderingContextOverloads { |
||||||
|
uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; |
||||||
|
uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; |
||||||
|
uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; |
||||||
|
uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; |
||||||
|
uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; |
||||||
|
uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; |
||||||
|
uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void; |
||||||
|
uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void; |
||||||
|
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; |
||||||
|
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; |
||||||
|
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void; |
||||||
|
} |
@ -0,0 +1,148 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface Map<K, V> { |
||||||
|
|
||||||
|
clear(): void; |
||||||
|
/** |
||||||
|
* @returns true if an element in the Map existed and has been removed, or false if the element does not exist. |
||||||
|
*/ |
||||||
|
delete(key: K): boolean; |
||||||
|
/** |
||||||
|
* Executes a provided function once per each key/value pair in the Map, in insertion order. |
||||||
|
*/ |
||||||
|
forEach(callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any): void; |
||||||
|
/** |
||||||
|
* Returns a specified element from the Map object. If the value that is associated to the provided key is an object, then you will get a reference to that object and any change made to that object will effectively modify it inside the Map. |
||||||
|
* @returns Returns the element associated with the specified key. If no element is associated with the specified key, undefined is returned. |
||||||
|
*/ |
||||||
|
get(key: K): V | undefined; |
||||||
|
/** |
||||||
|
* @returns boolean indicating whether an element with the specified key exists or not. |
||||||
|
*/ |
||||||
|
has(key: K): boolean; |
||||||
|
/** |
||||||
|
* Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated. |
||||||
|
*/ |
||||||
|
set(key: K, value: V): this; |
||||||
|
/** |
||||||
|
* @returns the number of elements in the Map. |
||||||
|
*/ |
||||||
|
readonly size: number; |
||||||
|
} |
||||||
|
|
||||||
|
interface MapConstructor { |
||||||
|
new(): Map<any, any>; |
||||||
|
new <K, V>(entries?: readonly (readonly [K, V])[] | null): Map<K, V>; |
||||||
|
readonly prototype: Map<any, any>; |
||||||
|
} |
||||||
|
declare var Map: MapConstructor; |
||||||
|
|
||||||
|
interface ReadonlyMap<K, V> { |
||||||
|
forEach(callbackfn: (value: V, key: K, map: ReadonlyMap<K, V>) => void, thisArg?: any): void; |
||||||
|
get(key: K): V | undefined; |
||||||
|
has(key: K): boolean; |
||||||
|
readonly size: number; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakMap<K extends object, V> { |
||||||
|
/** |
||||||
|
* Removes the specified element from the WeakMap. |
||||||
|
* @returns true if the element was successfully removed, or false if it was not present. |
||||||
|
*/ |
||||||
|
delete(key: K): boolean; |
||||||
|
/** |
||||||
|
* @returns a specified element. |
||||||
|
*/ |
||||||
|
get(key: K): V | undefined; |
||||||
|
/** |
||||||
|
* @returns a boolean indicating whether an element with the specified key exists or not. |
||||||
|
*/ |
||||||
|
has(key: K): boolean; |
||||||
|
/** |
||||||
|
* Adds a new element with a specified key and value. |
||||||
|
* @param key Must be an object. |
||||||
|
*/ |
||||||
|
set(key: K, value: V): this; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakMapConstructor { |
||||||
|
new <K extends object = object, V = any>(entries?: readonly [K, V][] | null): WeakMap<K, V>; |
||||||
|
readonly prototype: WeakMap<object, any>; |
||||||
|
} |
||||||
|
declare var WeakMap: WeakMapConstructor; |
||||||
|
|
||||||
|
interface Set<T> { |
||||||
|
/** |
||||||
|
* Appends a new element with a specified value to the end of the Set. |
||||||
|
*/ |
||||||
|
add(value: T): this; |
||||||
|
|
||||||
|
clear(): void; |
||||||
|
/** |
||||||
|
* Removes a specified value from the Set. |
||||||
|
* @returns Returns true if an element in the Set existed and has been removed, or false if the element does not exist. |
||||||
|
*/ |
||||||
|
delete(value: T): boolean; |
||||||
|
/** |
||||||
|
* Executes a provided function once per each value in the Set object, in insertion order. |
||||||
|
*/ |
||||||
|
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void; |
||||||
|
/** |
||||||
|
* @returns a boolean indicating whether an element with the specified value exists in the Set or not. |
||||||
|
*/ |
||||||
|
has(value: T): boolean; |
||||||
|
/** |
||||||
|
* @returns the number of (unique) elements in Set. |
||||||
|
*/ |
||||||
|
readonly size: number; |
||||||
|
} |
||||||
|
|
||||||
|
interface SetConstructor { |
||||||
|
new <T = any>(values?: readonly T[] | null): Set<T>; |
||||||
|
readonly prototype: Set<any>; |
||||||
|
} |
||||||
|
declare var Set: SetConstructor; |
||||||
|
|
||||||
|
interface ReadonlySet<T> { |
||||||
|
forEach(callbackfn: (value: T, value2: T, set: ReadonlySet<T>) => void, thisArg?: any): void; |
||||||
|
has(value: T): boolean; |
||||||
|
readonly size: number; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakSet<T extends object> { |
||||||
|
/** |
||||||
|
* Appends a new object to the end of the WeakSet. |
||||||
|
*/ |
||||||
|
add(value: T): this; |
||||||
|
/** |
||||||
|
* Removes the specified element from the WeakSet. |
||||||
|
* @returns Returns true if the element existed and has been removed, or false if the element does not exist. |
||||||
|
*/ |
||||||
|
delete(value: T): boolean; |
||||||
|
/** |
||||||
|
* @returns a boolean indicating whether an object exists in the WeakSet or not. |
||||||
|
*/ |
||||||
|
has(value: T): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakSetConstructor { |
||||||
|
new <T extends object = object>(values?: readonly T[] | null): WeakSet<T>; |
||||||
|
readonly prototype: WeakSet<object>; |
||||||
|
} |
||||||
|
declare var WeakSet: WeakSetConstructor; |
@ -0,0 +1,28 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es5" />
|
||||||
|
/// <reference lib="es2015.core" />
|
||||||
|
/// <reference lib="es2015.collection" />
|
||||||
|
/// <reference lib="es2015.iterable" />
|
||||||
|
/// <reference lib="es2015.generator" />
|
||||||
|
/// <reference lib="es2015.promise" />
|
||||||
|
/// <reference lib="es2015.proxy" />
|
||||||
|
/// <reference lib="es2015.reflect" />
|
||||||
|
/// <reference lib="es2015.symbol" />
|
||||||
|
/// <reference lib="es2015.symbol.wellknown" />
|
@ -0,0 +1,77 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015.iterable" />
|
||||||
|
|
||||||
|
interface Generator<T = unknown, TReturn = any, TNext = unknown> extends Iterator<T, TReturn, TNext> { |
||||||
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
||||||
|
next(...args: [] | [TNext]): IteratorResult<T, TReturn>; |
||||||
|
return(value: TReturn): IteratorResult<T, TReturn>; |
||||||
|
throw(e: any): IteratorResult<T, TReturn>; |
||||||
|
[Symbol.iterator](): Generator<T, TReturn, TNext>; |
||||||
|
} |
||||||
|
|
||||||
|
interface GeneratorFunction { |
||||||
|
/** |
||||||
|
* Creates a new Generator object. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
new (...args: any[]): Generator; |
||||||
|
/** |
||||||
|
* Creates a new Generator object. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
(...args: any[]): Generator; |
||||||
|
/** |
||||||
|
* The length of the arguments. |
||||||
|
*/ |
||||||
|
readonly length: number; |
||||||
|
/** |
||||||
|
* Returns the name of the function. |
||||||
|
*/ |
||||||
|
readonly name: string; |
||||||
|
/** |
||||||
|
* A reference to the prototype. |
||||||
|
*/ |
||||||
|
readonly prototype: Generator; |
||||||
|
} |
||||||
|
|
||||||
|
interface GeneratorFunctionConstructor { |
||||||
|
/** |
||||||
|
* Creates a new Generator function. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
new (...args: string[]): GeneratorFunction; |
||||||
|
/** |
||||||
|
* Creates a new Generator function. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
(...args: string[]): GeneratorFunction; |
||||||
|
/** |
||||||
|
* The length of the arguments. |
||||||
|
*/ |
||||||
|
readonly length: number; |
||||||
|
/** |
||||||
|
* Returns the name of the function. |
||||||
|
*/ |
||||||
|
readonly name: string; |
||||||
|
/** |
||||||
|
* A reference to the prototype. |
||||||
|
*/ |
||||||
|
readonly prototype: GeneratorFunction; |
||||||
|
} |
@ -0,0 +1,496 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015.symbol" />
|
||||||
|
|
||||||
|
interface SymbolConstructor { |
||||||
|
/** |
||||||
|
* A method that returns the default iterator for an object. Called by the semantics of the |
||||||
|
* for-of statement. |
||||||
|
*/ |
||||||
|
readonly iterator: unique symbol; |
||||||
|
} |
||||||
|
|
||||||
|
interface IteratorYieldResult<TYield> { |
||||||
|
done?: false; |
||||||
|
value: TYield; |
||||||
|
} |
||||||
|
|
||||||
|
interface IteratorReturnResult<TReturn> { |
||||||
|
done: true; |
||||||
|
value: TReturn; |
||||||
|
} |
||||||
|
|
||||||
|
type IteratorResult<T, TReturn = any> = IteratorYieldResult<T> | IteratorReturnResult<TReturn>; |
||||||
|
|
||||||
|
interface Iterator<T, TReturn = any, TNext = undefined> { |
||||||
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
||||||
|
next(...args: [] | [TNext]): IteratorResult<T, TReturn>; |
||||||
|
return?(value?: TReturn): IteratorResult<T, TReturn>; |
||||||
|
throw?(e?: any): IteratorResult<T, TReturn>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Iterable<T> { |
||||||
|
[Symbol.iterator](): Iterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface IterableIterator<T> extends Iterator<T> { |
||||||
|
[Symbol.iterator](): IterableIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Array<T> { |
||||||
|
/** Iterator */ |
||||||
|
[Symbol.iterator](): IterableIterator<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, T]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface ArrayConstructor { |
||||||
|
/** |
||||||
|
* Creates an array from an iterable object. |
||||||
|
* @param iterable An iterable object to convert to an array. |
||||||
|
*/ |
||||||
|
from<T>(iterable: Iterable<T> | ArrayLike<T>): T[]; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an iterable object. |
||||||
|
* @param iterable An iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[]; |
||||||
|
} |
||||||
|
|
||||||
|
interface ReadonlyArray<T> { |
||||||
|
/** Iterator of values in the array. */ |
||||||
|
[Symbol.iterator](): IterableIterator<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, T]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface IArguments { |
||||||
|
/** Iterator */ |
||||||
|
[Symbol.iterator](): IterableIterator<any>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Map<K, V> { |
||||||
|
/** Returns an iterable of entries in the map. */ |
||||||
|
[Symbol.iterator](): IterableIterator<[K, V]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of key, value pairs for every entry in the map. |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[K, V]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of keys in the map |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<K>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of values in the map |
||||||
|
*/ |
||||||
|
values(): IterableIterator<V>; |
||||||
|
} |
||||||
|
|
||||||
|
interface ReadonlyMap<K, V> { |
||||||
|
/** Returns an iterable of entries in the map. */ |
||||||
|
[Symbol.iterator](): IterableIterator<[K, V]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of key, value pairs for every entry in the map. |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[K, V]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of keys in the map |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<K>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of values in the map |
||||||
|
*/ |
||||||
|
values(): IterableIterator<V>; |
||||||
|
} |
||||||
|
|
||||||
|
interface MapConstructor { |
||||||
|
new(): Map<any, any>; |
||||||
|
new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakMap<K extends object, V> { } |
||||||
|
|
||||||
|
interface WeakMapConstructor { |
||||||
|
new <K extends object, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Set<T> { |
||||||
|
/** Iterates over values in the set. */ |
||||||
|
[Symbol.iterator](): IterableIterator<T>; |
||||||
|
/** |
||||||
|
* Returns an iterable of [v,v] pairs for every value `v` in the set. |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[T, T]>; |
||||||
|
/** |
||||||
|
* Despite its name, returns an iterable of the values in the set. |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of values in the set. |
||||||
|
*/ |
||||||
|
values(): IterableIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface ReadonlySet<T> { |
||||||
|
/** Iterates over values in the set. */ |
||||||
|
[Symbol.iterator](): IterableIterator<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of [v,v] pairs for every value `v` in the set. |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[T, T]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Despite its name, returns an iterable of the values in the set. |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an iterable of values in the set. |
||||||
|
*/ |
||||||
|
values(): IterableIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface SetConstructor { |
||||||
|
new <T>(iterable?: Iterable<T> | null): Set<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakSet<T extends object> { } |
||||||
|
|
||||||
|
interface WeakSetConstructor { |
||||||
|
new <T extends object = object>(iterable: Iterable<T>): WeakSet<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Promise<T> { } |
||||||
|
|
||||||
|
interface PromiseConstructor { |
||||||
|
/** |
||||||
|
* Creates a Promise that is resolved with an array of results when all of the provided Promises |
||||||
|
* resolve, or rejected when any Promise is rejected. |
||||||
|
* @param values An iterable of Promises. |
||||||
|
* @returns A new Promise. |
||||||
|
*/ |
||||||
|
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved |
||||||
|
* or rejected. |
||||||
|
* @param values An iterable of Promises. |
||||||
|
* @returns A new Promise. |
||||||
|
*/ |
||||||
|
race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>; |
||||||
|
} |
||||||
|
|
||||||
|
interface String { |
||||||
|
/** Iterator */ |
||||||
|
[Symbol.iterator](): IterableIterator<string>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int8Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int8ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Int8Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Uint8Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ClampedArray { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ClampedArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Uint8ClampedArray; |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int16Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int16ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Int16Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint16Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint16ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Uint16Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int32Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int32ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Int32Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint32Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint32ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Uint32Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float32Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float32ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Float32Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float64Array { |
||||||
|
[Symbol.iterator](): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an array of key, value pairs for every entry in the array |
||||||
|
*/ |
||||||
|
entries(): IterableIterator<[number, number]>; |
||||||
|
/** |
||||||
|
* Returns an list of keys in the array |
||||||
|
*/ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
/** |
||||||
|
* Returns an list of values in the array |
||||||
|
*/ |
||||||
|
values(): IterableIterator<number>; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float64ArrayConstructor { |
||||||
|
new (elements: Iterable<number>): Float64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array; |
||||||
|
} |
@ -0,0 +1,81 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface PromiseConstructor { |
||||||
|
/** |
||||||
|
* A reference to the prototype. |
||||||
|
*/ |
||||||
|
readonly prototype: Promise<any>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a new Promise. |
||||||
|
* @param executor A callback used to initialize the promise. This callback is passed two arguments: |
||||||
|
* a resolve callback used to resolve the promise with a value or the result of another promise, |
||||||
|
* and a reject callback used to reject the promise with a provided reason or error. |
||||||
|
*/ |
||||||
|
new <T>(executor: (resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a Promise that is resolved with an array of results when all of the provided Promises |
||||||
|
* resolve, or rejected when any Promise is rejected. |
||||||
|
* @param values An array of Promises. |
||||||
|
* @returns A new Promise. |
||||||
|
*/ |
||||||
|
all<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: Awaited<T[P]> }>; |
||||||
|
|
||||||
|
// see: lib.es2015.iterable.d.ts
|
||||||
|
// all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>;
|
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved |
||||||
|
* or rejected. |
||||||
|
* @param values An array of Promises. |
||||||
|
* @returns A new Promise. |
||||||
|
*/ |
||||||
|
race<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>; |
||||||
|
|
||||||
|
// see: lib.es2015.iterable.d.ts
|
||||||
|
// race<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a new rejected promise for the provided reason. |
||||||
|
* @param reason The reason the promise was rejected. |
||||||
|
* @returns A new rejected Promise. |
||||||
|
*/ |
||||||
|
reject<T = never>(reason?: any): Promise<T>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a new resolved promise. |
||||||
|
* @returns A resolved promise. |
||||||
|
*/ |
||||||
|
resolve(): Promise<void>; |
||||||
|
/** |
||||||
|
* Creates a new resolved promise for the provided value. |
||||||
|
* @param value A promise. |
||||||
|
* @returns A promise whose internal state matches the provided promise. |
||||||
|
*/ |
||||||
|
resolve<T>(value: T): Promise<Awaited<T>>; |
||||||
|
/** |
||||||
|
* Creates a new resolved promise for the provided value. |
||||||
|
* @param value A promise. |
||||||
|
* @returns A promise whose internal state matches the provided promise. |
||||||
|
*/ |
||||||
|
resolve<T>(value: T | PromiseLike<T>): Promise<Awaited<T>>; |
||||||
|
} |
||||||
|
|
||||||
|
declare var Promise: PromiseConstructor; |
@ -0,0 +1,128 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface ProxyHandler<T extends object> { |
||||||
|
/** |
||||||
|
* A trap method for a function call. |
||||||
|
* @param target The original callable object which is being proxied. |
||||||
|
*/ |
||||||
|
apply?(target: T, thisArg: any, argArray: any[]): any; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for the `new` operator. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param newTarget The constructor that was originally called. |
||||||
|
*/ |
||||||
|
construct?(target: T, argArray: any[], newTarget: Function): object; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for `Object.defineProperty()`. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @returns A `Boolean` indicating whether or not the property has been defined. |
||||||
|
*/ |
||||||
|
defineProperty?(target: T, property: string | symbol, attributes: PropertyDescriptor): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for the `delete` operator. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param p The name or `Symbol` of the property to delete. |
||||||
|
* @returns A `Boolean` indicating whether or not the property was deleted. |
||||||
|
*/ |
||||||
|
deleteProperty?(target: T, p: string | symbol): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for getting a property value. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param p The name or `Symbol` of the property to get. |
||||||
|
* @param receiver The proxy or an object that inherits from the proxy. |
||||||
|
*/ |
||||||
|
get?(target: T, p: string | symbol, receiver: any): any; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for `Object.getOwnPropertyDescriptor()`. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param p The name of the property whose description should be retrieved. |
||||||
|
*/ |
||||||
|
getOwnPropertyDescriptor?(target: T, p: string | symbol): PropertyDescriptor | undefined; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for the `[[GetPrototypeOf]]` internal method. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
*/ |
||||||
|
getPrototypeOf?(target: T): object | null; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for the `in` operator. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param p The name or `Symbol` of the property to check for existence. |
||||||
|
*/ |
||||||
|
has?(target: T, p: string | symbol): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for `Object.isExtensible()`. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
*/ |
||||||
|
isExtensible?(target: T): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for `Reflect.ownKeys()`. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
*/ |
||||||
|
ownKeys?(target: T): ArrayLike<string | symbol>; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for `Object.preventExtensions()`. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
*/ |
||||||
|
preventExtensions?(target: T): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for setting a property value. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param p The name or `Symbol` of the property to set. |
||||||
|
* @param receiver The object to which the assignment was originally directed. |
||||||
|
* @returns A `Boolean` indicating whether or not the property was set. |
||||||
|
*/ |
||||||
|
set?(target: T, p: string | symbol, newValue: any, receiver: any): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* A trap for `Object.setPrototypeOf()`. |
||||||
|
* @param target The original object which is being proxied. |
||||||
|
* @param newPrototype The object's new prototype or `null`. |
||||||
|
*/ |
||||||
|
setPrototypeOf?(target: T, v: object | null): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface ProxyConstructor { |
||||||
|
/** |
||||||
|
* Creates a revocable Proxy object. |
||||||
|
* @param target A target object to wrap with Proxy. |
||||||
|
* @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. |
||||||
|
*/ |
||||||
|
revocable<T extends object>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; }; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates a Proxy object. The Proxy object allows you to create an object that can be used in place of the |
||||||
|
* original object, but which may redefine fundamental Object operations like getting, setting, and defining |
||||||
|
* properties. Proxy objects are commonly used to log property accesses, validate, format, or sanitize inputs. |
||||||
|
* @param target A target object to wrap with Proxy. |
||||||
|
* @param handler An object whose properties define the behavior of Proxy when an operation is attempted on it. |
||||||
|
*/ |
||||||
|
new <T extends object>(target: T, handler: ProxyHandler<T>): T; |
||||||
|
} |
||||||
|
declare var Proxy: ProxyConstructor; |
@ -0,0 +1,144 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
declare namespace Reflect { |
||||||
|
/** |
||||||
|
* Calls the function with the specified object as the this value |
||||||
|
* and the elements of specified array as the arguments. |
||||||
|
* @param target The function to call. |
||||||
|
* @param thisArgument The object to be used as the this object. |
||||||
|
* @param argumentsList An array of argument values to be passed to the function. |
||||||
|
*/ |
||||||
|
function apply<T, A extends readonly any[], R>( |
||||||
|
target: (this: T, ...args: A) => R, |
||||||
|
thisArgument: T, |
||||||
|
argumentsList: Readonly<A>, |
||||||
|
): R; |
||||||
|
function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any; |
||||||
|
|
||||||
|
/** |
||||||
|
* Constructs the target with the elements of specified array as the arguments |
||||||
|
* and the specified constructor as the `new.target` value. |
||||||
|
* @param target The constructor to invoke. |
||||||
|
* @param argumentsList An array of argument values to be passed to the constructor. |
||||||
|
* @param newTarget The constructor to be used as the `new.target` object. |
||||||
|
*/ |
||||||
|
function construct<A extends readonly any[], R>( |
||||||
|
target: new (...args: A) => R, |
||||||
|
argumentsList: Readonly<A>, |
||||||
|
newTarget?: new (...args: any) => any, |
||||||
|
): R; |
||||||
|
function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: Function): any; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds a property to an object, or modifies attributes of an existing property. |
||||||
|
* @param target Object on which to add or modify the property. This can be a native JavaScript object |
||||||
|
* (that is, a user-defined object or a built in object) or a DOM object. |
||||||
|
* @param propertyKey The property name. |
||||||
|
* @param attributes Descriptor for the property. It can be for a data property or an accessor property. |
||||||
|
*/ |
||||||
|
function defineProperty(target: object, propertyKey: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Removes a property from an object, equivalent to `delete target[propertyKey]`, |
||||||
|
* except it won't throw if `target[propertyKey]` is non-configurable. |
||||||
|
* @param target Object from which to remove the own property. |
||||||
|
* @param propertyKey The property name. |
||||||
|
*/ |
||||||
|
function deleteProperty(target: object, propertyKey: PropertyKey): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Gets the property of target, equivalent to `target[propertyKey]` when `receiver === target`. |
||||||
|
* @param target Object that contains the property on itself or in its prototype chain. |
||||||
|
* @param propertyKey The property name. |
||||||
|
* @param receiver The reference to use as the `this` value in the getter function, |
||||||
|
* if `target[propertyKey]` is an accessor property. |
||||||
|
*/ |
||||||
|
function get<T extends object, P extends PropertyKey>( |
||||||
|
target: T, |
||||||
|
propertyKey: P, |
||||||
|
receiver?: unknown, |
||||||
|
): P extends keyof T ? T[P] : any; |
||||||
|
|
||||||
|
/** |
||||||
|
* Gets the own property descriptor of the specified object. |
||||||
|
* An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype. |
||||||
|
* @param target Object that contains the property. |
||||||
|
* @param propertyKey The property name. |
||||||
|
*/ |
||||||
|
function getOwnPropertyDescriptor<T extends object, P extends PropertyKey>( |
||||||
|
target: T, |
||||||
|
propertyKey: P, |
||||||
|
): TypedPropertyDescriptor<P extends keyof T ? T[P] : any> | undefined; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the prototype of an object. |
||||||
|
* @param target The object that references the prototype. |
||||||
|
*/ |
||||||
|
function getPrototypeOf(target: object): object | null; |
||||||
|
|
||||||
|
/** |
||||||
|
* Equivalent to `propertyKey in target`. |
||||||
|
* @param target Object that contains the property on itself or in its prototype chain. |
||||||
|
* @param propertyKey Name of the property. |
||||||
|
*/ |
||||||
|
function has(target: object, propertyKey: PropertyKey): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a value that indicates whether new properties can be added to an object. |
||||||
|
* @param target Object to test. |
||||||
|
*/ |
||||||
|
function isExtensible(target: object): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the string and symbol keys of the own properties of an object. The own properties of an object |
||||||
|
* are those that are defined directly on that object, and are not inherited from the object's prototype. |
||||||
|
* @param target Object that contains the own properties. |
||||||
|
*/ |
||||||
|
function ownKeys(target: object): (string | symbol)[]; |
||||||
|
|
||||||
|
/** |
||||||
|
* Prevents the addition of new properties to an object. |
||||||
|
* @param target Object to make non-extensible. |
||||||
|
* @return Whether the object has been made non-extensible. |
||||||
|
*/ |
||||||
|
function preventExtensions(target: object): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sets the property of target, equivalent to `target[propertyKey] = value` when `receiver === target`. |
||||||
|
* @param target Object that contains the property on itself or in its prototype chain. |
||||||
|
* @param propertyKey Name of the property. |
||||||
|
* @param receiver The reference to use as the `this` value in the setter function, |
||||||
|
* if `target[propertyKey]` is an accessor property. |
||||||
|
*/ |
||||||
|
function set<T extends object, P extends PropertyKey>( |
||||||
|
target: T, |
||||||
|
propertyKey: P, |
||||||
|
value: P extends keyof T ? T[P] : any, |
||||||
|
receiver?: any, |
||||||
|
): boolean; |
||||||
|
function set(target: object, propertyKey: PropertyKey, value: any, receiver?: any): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sets the prototype of a specified object o to object proto or null. |
||||||
|
* @param target The object to change its prototype. |
||||||
|
* @param proto The value of the new prototype or null. |
||||||
|
* @return Whether setting the prototype was successful. |
||||||
|
*/ |
||||||
|
function setPrototypeOf(target: object, proto: object | null): boolean; |
||||||
|
} |
@ -0,0 +1,46 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface SymbolConstructor { |
||||||
|
/** |
||||||
|
* A reference to the prototype. |
||||||
|
*/ |
||||||
|
readonly prototype: Symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a new unique Symbol value. |
||||||
|
* @param description Description of the new Symbol object. |
||||||
|
*/ |
||||||
|
(description?: string | number): symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a Symbol object from the global symbol registry matching the given key if found. |
||||||
|
* Otherwise, returns a new symbol with this key. |
||||||
|
* @param key key to search for. |
||||||
|
*/ |
||||||
|
for(key: string): symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a key from the global symbol registry matching the given Symbol if found. |
||||||
|
* Otherwise, returns a undefined. |
||||||
|
* @param sym Symbol to find the key for. |
||||||
|
*/ |
||||||
|
keyFor(sym: symbol): string | undefined; |
||||||
|
} |
||||||
|
|
||||||
|
declare var Symbol: SymbolConstructor; |
@ -0,0 +1,326 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015.symbol" />
|
||||||
|
|
||||||
|
interface SymbolConstructor { |
||||||
|
/** |
||||||
|
* A method that determines if a constructor object recognizes an object as one of the |
||||||
|
* constructor’s instances. Called by the semantics of the instanceof operator. |
||||||
|
*/ |
||||||
|
readonly hasInstance: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A Boolean value that if true indicates that an object should flatten to its array elements |
||||||
|
* by Array.prototype.concat. |
||||||
|
*/ |
||||||
|
readonly isConcatSpreadable: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A regular expression method that matches the regular expression against a string. Called |
||||||
|
* by the String.prototype.match method. |
||||||
|
*/ |
||||||
|
readonly match: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A regular expression method that replaces matched substrings of a string. Called by the |
||||||
|
* String.prototype.replace method. |
||||||
|
*/ |
||||||
|
readonly replace: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A regular expression method that returns the index within a string that matches the |
||||||
|
* regular expression. Called by the String.prototype.search method. |
||||||
|
*/ |
||||||
|
readonly search: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A function valued property that is the constructor function that is used to create |
||||||
|
* derived objects. |
||||||
|
*/ |
||||||
|
readonly species: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A regular expression method that splits a string at the indices that match the regular |
||||||
|
* expression. Called by the String.prototype.split method. |
||||||
|
*/ |
||||||
|
readonly split: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A method that converts an object to a corresponding primitive value. |
||||||
|
* Called by the ToPrimitive abstract operation. |
||||||
|
*/ |
||||||
|
readonly toPrimitive: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* A String value that is used in the creation of the default string description of an object. |
||||||
|
* Called by the built-in method Object.prototype.toString. |
||||||
|
*/ |
||||||
|
readonly toStringTag: unique symbol; |
||||||
|
|
||||||
|
/** |
||||||
|
* An Object whose truthy properties are properties that are excluded from the 'with' |
||||||
|
* environment bindings of the associated objects. |
||||||
|
*/ |
||||||
|
readonly unscopables: unique symbol; |
||||||
|
} |
||||||
|
|
||||||
|
interface Symbol { |
||||||
|
/** |
||||||
|
* Converts a Symbol object to a symbol. |
||||||
|
*/ |
||||||
|
[Symbol.toPrimitive](hint: string): symbol; |
||||||
|
|
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface Array<T> { |
||||||
|
/** |
||||||
|
* Is an object whose properties have the value 'true' |
||||||
|
* when they will be absent when used in a 'with' statement. |
||||||
|
*/ |
||||||
|
readonly [Symbol.unscopables]: { |
||||||
|
[K in keyof any[]]?: boolean; |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
interface ReadonlyArray<T> { |
||||||
|
/** |
||||||
|
* Is an object whose properties have the value 'true' |
||||||
|
* when they will be absent when used in a 'with' statement. |
||||||
|
*/ |
||||||
|
readonly [Symbol.unscopables]: { |
||||||
|
[K in keyof readonly any[]]?: boolean; |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
interface Date { |
||||||
|
/** |
||||||
|
* Converts a Date object to a string. |
||||||
|
*/ |
||||||
|
[Symbol.toPrimitive](hint: "default"): string; |
||||||
|
/** |
||||||
|
* Converts a Date object to a string. |
||||||
|
*/ |
||||||
|
[Symbol.toPrimitive](hint: "string"): string; |
||||||
|
/** |
||||||
|
* Converts a Date object to a number. |
||||||
|
*/ |
||||||
|
[Symbol.toPrimitive](hint: "number"): number; |
||||||
|
/** |
||||||
|
* Converts a Date object to a string or number. |
||||||
|
* |
||||||
|
* @param hint The strings "number", "string", or "default" to specify what primitive to return. |
||||||
|
* |
||||||
|
* @throws {TypeError} If 'hint' was given something other than "number", "string", or "default". |
||||||
|
* @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default". |
||||||
|
*/ |
||||||
|
[Symbol.toPrimitive](hint: string): string | number; |
||||||
|
} |
||||||
|
|
||||||
|
interface Map<K, V> { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakMap<K extends object, V> { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface Set<T> { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface WeakSet<T extends object> { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface JSON { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface Function { |
||||||
|
/** |
||||||
|
* Determines whether the given value inherits from this function if this function was used |
||||||
|
* as a constructor function. |
||||||
|
* |
||||||
|
* A constructor function can control which objects are recognized as its instances by |
||||||
|
* 'instanceof' by overriding this method. |
||||||
|
*/ |
||||||
|
[Symbol.hasInstance](value: any): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface GeneratorFunction { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface Math { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface Promise<T> { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface PromiseConstructor { |
||||||
|
readonly [Symbol.species]: PromiseConstructor; |
||||||
|
} |
||||||
|
|
||||||
|
interface RegExp { |
||||||
|
/** |
||||||
|
* Matches a string with this regular expression, and returns an array containing the results of |
||||||
|
* that search. |
||||||
|
* @param string A string to search within. |
||||||
|
*/ |
||||||
|
[Symbol.match](string: string): RegExpMatchArray | null; |
||||||
|
|
||||||
|
/** |
||||||
|
* Replaces text in a string, using this regular expression. |
||||||
|
* @param string A String object or string literal whose contents matching against |
||||||
|
* this regular expression will be replaced |
||||||
|
* @param replaceValue A String object or string literal containing the text to replace for every |
||||||
|
* successful match of this regular expression. |
||||||
|
*/ |
||||||
|
[Symbol.replace](string: string, replaceValue: string): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Replaces text in a string, using this regular expression. |
||||||
|
* @param string A String object or string literal whose contents matching against |
||||||
|
* this regular expression will be replaced |
||||||
|
* @param replacer A function that returns the replacement text. |
||||||
|
*/ |
||||||
|
[Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Finds the position beginning first substring match in a regular expression search |
||||||
|
* using this regular expression. |
||||||
|
* |
||||||
|
* @param string The string to search within. |
||||||
|
*/ |
||||||
|
[Symbol.search](string: string): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an array of substrings that were delimited by strings in the original input that |
||||||
|
* match against this regular expression. |
||||||
|
* |
||||||
|
* If the regular expression contains capturing parentheses, then each time this |
||||||
|
* regular expression matches, the results (including any undefined results) of the |
||||||
|
* capturing parentheses are spliced. |
||||||
|
* |
||||||
|
* @param string string value to split |
||||||
|
* @param limit if not undefined, the output array is truncated so that it contains no more |
||||||
|
* than 'limit' elements. |
||||||
|
*/ |
||||||
|
[Symbol.split](string: string, limit?: number): string[]; |
||||||
|
} |
||||||
|
|
||||||
|
interface RegExpConstructor { |
||||||
|
readonly [Symbol.species]: RegExpConstructor; |
||||||
|
} |
||||||
|
|
||||||
|
interface String { |
||||||
|
/** |
||||||
|
* Matches a string or an object that supports being matched against, and returns an array |
||||||
|
* containing the results of that search, or null if no matches are found. |
||||||
|
* @param matcher An object that supports being matched against. |
||||||
|
*/ |
||||||
|
match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null; |
||||||
|
|
||||||
|
/** |
||||||
|
* Passes a string and {@linkcode replaceValue} to the `[Symbol.replace]` method on {@linkcode searchValue}. This method is expected to implement its own replacement algorithm. |
||||||
|
* @param searchValue An object that supports searching for and replacing matches within a string. |
||||||
|
* @param replaceValue The replacement text. |
||||||
|
*/ |
||||||
|
replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Replaces text in a string, using an object that supports replacement within a string. |
||||||
|
* @param searchValue A object can search for and replace matches within a string. |
||||||
|
* @param replacer A function that returns the replacement text. |
||||||
|
*/ |
||||||
|
replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Finds the first substring match in a regular expression search. |
||||||
|
* @param searcher An object which supports searching within a string. |
||||||
|
*/ |
||||||
|
search(searcher: { [Symbol.search](string: string): number; }): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Split a string into substrings using the specified separator and return them as an array. |
||||||
|
* @param splitter An object that can split a string. |
||||||
|
* @param limit A value used to limit the number of elements returned in the array. |
||||||
|
*/ |
||||||
|
split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[]; |
||||||
|
} |
||||||
|
|
||||||
|
interface ArrayBuffer { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface DataView { |
||||||
|
readonly [Symbol.toStringTag]: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int8Array { |
||||||
|
readonly [Symbol.toStringTag]: "Int8Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8Array { |
||||||
|
readonly [Symbol.toStringTag]: "Uint8Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ClampedArray { |
||||||
|
readonly [Symbol.toStringTag]: "Uint8ClampedArray"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int16Array { |
||||||
|
readonly [Symbol.toStringTag]: "Int16Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint16Array { |
||||||
|
readonly [Symbol.toStringTag]: "Uint16Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int32Array { |
||||||
|
readonly [Symbol.toStringTag]: "Int32Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint32Array { |
||||||
|
readonly [Symbol.toStringTag]: "Uint32Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float32Array { |
||||||
|
readonly [Symbol.toStringTag]: "Float32Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float64Array { |
||||||
|
readonly [Symbol.toStringTag]: "Float64Array"; |
||||||
|
} |
||||||
|
|
||||||
|
interface ArrayConstructor { |
||||||
|
readonly [Symbol.species]: ArrayConstructor; |
||||||
|
} |
||||||
|
interface MapConstructor { |
||||||
|
readonly [Symbol.species]: MapConstructor; |
||||||
|
} |
||||||
|
interface SetConstructor { |
||||||
|
readonly [Symbol.species]: SetConstructor; |
||||||
|
} |
||||||
|
interface ArrayBufferConstructor { |
||||||
|
readonly [Symbol.species]: ArrayBufferConstructor; |
||||||
|
} |
@ -0,0 +1,116 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface Array<T> { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: T, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface ReadonlyArray<T> { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: T, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int8Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ClampedArray { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int16Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint16Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int32Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint32Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float32Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float64Array { |
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: number, fromIndex?: number): boolean; |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015" />
|
||||||
|
/// <reference lib="es2016.array.include" />
|
@ -0,0 +1,23 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2016" />
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
/// <reference lib="webworker.importscripts" />
|
||||||
|
/// <reference lib="scripthost" />
|
||||||
|
/// <reference lib="dom.iterable" />
|
@ -0,0 +1,24 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2016" />
|
||||||
|
/// <reference lib="es2017.object" />
|
||||||
|
/// <reference lib="es2017.sharedmemory" />
|
||||||
|
/// <reference lib="es2017.string" />
|
||||||
|
/// <reference lib="es2017.intl" />
|
||||||
|
/// <reference lib="es2017.typedarrays" />
|
@ -0,0 +1,23 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2017" />
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
/// <reference lib="webworker.importscripts" />
|
||||||
|
/// <reference lib="scripthost" />
|
||||||
|
/// <reference lib="dom.iterable" />
|
@ -0,0 +1,45 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
declare namespace Intl { |
||||||
|
|
||||||
|
interface DateTimeFormatPartTypesRegistry { |
||||||
|
day: any |
||||||
|
dayPeriod: any |
||||||
|
era: any |
||||||
|
hour: any |
||||||
|
literal: any |
||||||
|
minute: any |
||||||
|
month: any |
||||||
|
second: any |
||||||
|
timeZoneName: any |
||||||
|
weekday: any |
||||||
|
year: any |
||||||
|
} |
||||||
|
|
||||||
|
type DateTimeFormatPartTypes = keyof DateTimeFormatPartTypesRegistry; |
||||||
|
|
||||||
|
interface DateTimeFormatPart { |
||||||
|
type: DateTimeFormatPartTypes; |
||||||
|
value: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface DateTimeFormat { |
||||||
|
formatToParts(date?: Date | number): DateTimeFormatPart[]; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,49 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface ObjectConstructor { |
||||||
|
/** |
||||||
|
* Returns an array of values of the enumerable properties of an object |
||||||
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. |
||||||
|
*/ |
||||||
|
values<T>(o: { [s: string]: T } | ArrayLike<T>): T[]; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an array of values of the enumerable properties of an object |
||||||
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. |
||||||
|
*/ |
||||||
|
values(o: {}): any[]; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an array of key/values of the enumerable properties of an object |
||||||
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. |
||||||
|
*/ |
||||||
|
entries<T>(o: { [s: string]: T } | ArrayLike<T>): [string, T][]; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an array of key/values of the enumerable properties of an object |
||||||
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. |
||||||
|
*/ |
||||||
|
entries(o: {}): [string, any][]; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an object containing all own property descriptors of an object |
||||||
|
* @param o Object that contains the properties and methods. This can be an object that you created or an existing Document Object Model (DOM) object. |
||||||
|
*/ |
||||||
|
getOwnPropertyDescriptors<T>(o: T): {[P in keyof T]: TypedPropertyDescriptor<T[P]>} & { [x: string]: PropertyDescriptor }; |
||||||
|
} |
@ -0,0 +1,135 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015.symbol" />
|
||||||
|
/// <reference lib="es2015.symbol.wellknown" />
|
||||||
|
|
||||||
|
interface SharedArrayBuffer { |
||||||
|
/** |
||||||
|
* Read-only. The length of the ArrayBuffer (in bytes). |
||||||
|
*/ |
||||||
|
readonly byteLength: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a section of an SharedArrayBuffer. |
||||||
|
*/ |
||||||
|
slice(begin: number, end?: number): SharedArrayBuffer; |
||||||
|
readonly [Symbol.species]: SharedArrayBuffer; |
||||||
|
readonly [Symbol.toStringTag]: "SharedArrayBuffer"; |
||||||
|
} |
||||||
|
|
||||||
|
interface SharedArrayBufferConstructor { |
||||||
|
readonly prototype: SharedArrayBuffer; |
||||||
|
new (byteLength: number): SharedArrayBuffer; |
||||||
|
} |
||||||
|
declare var SharedArrayBuffer: SharedArrayBufferConstructor; |
||||||
|
|
||||||
|
interface ArrayBufferTypes { |
||||||
|
SharedArrayBuffer: SharedArrayBuffer; |
||||||
|
} |
||||||
|
|
||||||
|
interface Atomics { |
||||||
|
/** |
||||||
|
* Adds a value to the value at the given position in the array, returning the original value. |
||||||
|
* Until this atomic operation completes, any other read or write operation against the array |
||||||
|
* will block. |
||||||
|
*/ |
||||||
|
add(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Stores the bitwise AND of a value with the value at the given position in the array, |
||||||
|
* returning the original value. Until this atomic operation completes, any other read or |
||||||
|
* write operation against the array will block. |
||||||
|
*/ |
||||||
|
and(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Replaces the value at the given position in the array if the original value equals the given |
||||||
|
* expected value, returning the original value. Until this atomic operation completes, any |
||||||
|
* other read or write operation against the array will block. |
||||||
|
*/ |
||||||
|
compareExchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, expectedValue: number, replacementValue: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Replaces the value at the given position in the array, returning the original value. Until |
||||||
|
* this atomic operation completes, any other read or write operation against the array will |
||||||
|
* block. |
||||||
|
*/ |
||||||
|
exchange(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a value indicating whether high-performance algorithms can use atomic operations |
||||||
|
* (`true`) or must use locks (`false`) for the given number of bytes-per-element of a typed |
||||||
|
* array. |
||||||
|
*/ |
||||||
|
isLockFree(size: number): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the value at the given position in the array. Until this atomic operation completes, |
||||||
|
* any other read or write operation against the array will block. |
||||||
|
*/ |
||||||
|
load(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Stores the bitwise OR of a value with the value at the given position in the array, |
||||||
|
* returning the original value. Until this atomic operation completes, any other read or write |
||||||
|
* operation against the array will block. |
||||||
|
*/ |
||||||
|
or(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Stores a value at the given position in the array, returning the new value. Until this |
||||||
|
* atomic operation completes, any other read or write operation against the array will block. |
||||||
|
*/ |
||||||
|
store(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Subtracts a value from the value at the given position in the array, returning the original |
||||||
|
* value. Until this atomic operation completes, any other read or write operation against the |
||||||
|
* array will block. |
||||||
|
*/ |
||||||
|
sub(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* If the value at the given position in the array is equal to the provided value, the current |
||||||
|
* agent is put to sleep causing execution to suspend until the timeout expires (returning |
||||||
|
* `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns |
||||||
|
* `"not-equal"`. |
||||||
|
*/ |
||||||
|
wait(typedArray: Int32Array, index: number, value: number, timeout?: number): "ok" | "not-equal" | "timed-out"; |
||||||
|
|
||||||
|
/** |
||||||
|
* Wakes up sleeping agents that are waiting on the given index of the array, returning the |
||||||
|
* number of agents that were awoken. |
||||||
|
* @param typedArray A shared Int32Array. |
||||||
|
* @param index The position in the typedArray to wake up on. |
||||||
|
* @param count The number of sleeping agents to notify. Defaults to +Infinity. |
||||||
|
*/ |
||||||
|
notify(typedArray: Int32Array, index: number, count?: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Stores the bitwise XOR of a value with the value at the given position in the array, |
||||||
|
* returning the original value. Until this atomic operation completes, any other read or write |
||||||
|
* operation against the array will block. |
||||||
|
*/ |
||||||
|
xor(typedArray: Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array, index: number, value: number): number; |
||||||
|
|
||||||
|
readonly [Symbol.toStringTag]: "Atomics"; |
||||||
|
} |
||||||
|
|
||||||
|
declare var Atomics: Atomics; |
@ -0,0 +1,45 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface String { |
||||||
|
/** |
||||||
|
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. |
||||||
|
* The padding is applied from the start (left) of the current string. |
||||||
|
* |
||||||
|
* @param maxLength The length of the resulting string once the current string has been padded. |
||||||
|
* If this parameter is smaller than the current string's length, the current string will be returned as it is. |
||||||
|
* |
||||||
|
* @param fillString The string to pad the current string with. |
||||||
|
* If this string is too long, it will be truncated and the left-most part will be applied. |
||||||
|
* The default value for this parameter is " " (U+0020). |
||||||
|
*/ |
||||||
|
padStart(maxLength: number, fillString?: string): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. |
||||||
|
* The padding is applied from the end (right) of the current string. |
||||||
|
* |
||||||
|
* @param maxLength The length of the resulting string once the current string has been padded. |
||||||
|
* If this parameter is smaller than the current string's length, the current string will be returned as it is. |
||||||
|
* |
||||||
|
* @param fillString The string to pad the current string with. |
||||||
|
* If this string is too long, it will be truncated and the left-most part will be applied. |
||||||
|
* The default value for this parameter is " " (U+0020). |
||||||
|
*/ |
||||||
|
padEnd(maxLength: number, fillString?: string): string; |
||||||
|
} |
@ -0,0 +1,53 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface Int8ArrayConstructor { |
||||||
|
new (): Int8Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ArrayConstructor { |
||||||
|
new (): Uint8Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint8ClampedArrayConstructor { |
||||||
|
new (): Uint8ClampedArray; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int16ArrayConstructor { |
||||||
|
new (): Int16Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint16ArrayConstructor { |
||||||
|
new (): Uint16Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Int32ArrayConstructor { |
||||||
|
new (): Int32Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Uint32ArrayConstructor { |
||||||
|
new (): Uint32Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float32ArrayConstructor { |
||||||
|
new (): Float32Array; |
||||||
|
} |
||||||
|
|
||||||
|
interface Float64ArrayConstructor { |
||||||
|
new (): Float64Array; |
||||||
|
} |
@ -0,0 +1,77 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2018.asynciterable" />
|
||||||
|
|
||||||
|
interface AsyncGenerator<T = unknown, TReturn = any, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> { |
||||||
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
||||||
|
next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>; |
||||||
|
return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>; |
||||||
|
throw(e: any): Promise<IteratorResult<T, TReturn>>; |
||||||
|
[Symbol.asyncIterator](): AsyncGenerator<T, TReturn, TNext>; |
||||||
|
} |
||||||
|
|
||||||
|
interface AsyncGeneratorFunction { |
||||||
|
/** |
||||||
|
* Creates a new AsyncGenerator object. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
new (...args: any[]): AsyncGenerator; |
||||||
|
/** |
||||||
|
* Creates a new AsyncGenerator object. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
(...args: any[]): AsyncGenerator; |
||||||
|
/** |
||||||
|
* The length of the arguments. |
||||||
|
*/ |
||||||
|
readonly length: number; |
||||||
|
/** |
||||||
|
* Returns the name of the function. |
||||||
|
*/ |
||||||
|
readonly name: string; |
||||||
|
/** |
||||||
|
* A reference to the prototype. |
||||||
|
*/ |
||||||
|
readonly prototype: AsyncGenerator; |
||||||
|
} |
||||||
|
|
||||||
|
interface AsyncGeneratorFunctionConstructor { |
||||||
|
/** |
||||||
|
* Creates a new AsyncGenerator function. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
new (...args: string[]): AsyncGeneratorFunction; |
||||||
|
/** |
||||||
|
* Creates a new AsyncGenerator function. |
||||||
|
* @param args A list of arguments the function accepts. |
||||||
|
*/ |
||||||
|
(...args: string[]): AsyncGeneratorFunction; |
||||||
|
/** |
||||||
|
* The length of the arguments. |
||||||
|
*/ |
||||||
|
readonly length: number; |
||||||
|
/** |
||||||
|
* Returns the name of the function. |
||||||
|
*/ |
||||||
|
readonly name: string; |
||||||
|
/** |
||||||
|
* A reference to the prototype. |
||||||
|
*/ |
||||||
|
readonly prototype: AsyncGeneratorFunction; |
||||||
|
} |
@ -0,0 +1,43 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015.symbol" />
|
||||||
|
/// <reference lib="es2015.iterable" />
|
||||||
|
|
||||||
|
interface SymbolConstructor { |
||||||
|
/** |
||||||
|
* A method that returns the default async iterator for an object. Called by the semantics of |
||||||
|
* the for-await-of statement. |
||||||
|
*/ |
||||||
|
readonly asyncIterator: unique symbol; |
||||||
|
} |
||||||
|
|
||||||
|
interface AsyncIterator<T, TReturn = any, TNext = undefined> { |
||||||
|
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
||||||
|
next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>; |
||||||
|
return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>; |
||||||
|
throw?(e?: any): Promise<IteratorResult<T, TReturn>>; |
||||||
|
} |
||||||
|
|
||||||
|
interface AsyncIterable<T> { |
||||||
|
[Symbol.asyncIterator](): AsyncIterator<T>; |
||||||
|
} |
||||||
|
|
||||||
|
interface AsyncIterableIterator<T> extends AsyncIterator<T> { |
||||||
|
[Symbol.asyncIterator](): AsyncIterableIterator<T>; |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2017" />
|
||||||
|
/// <reference lib="es2018.asynciterable" />
|
||||||
|
/// <reference lib="es2018.asyncgenerator" />
|
||||||
|
/// <reference lib="es2018.promise" />
|
||||||
|
/// <reference lib="es2018.regexp" />
|
||||||
|
/// <reference lib="es2018.intl" />
|
@ -0,0 +1,23 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2018" />
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
/// <reference lib="webworker.importscripts" />
|
||||||
|
/// <reference lib="scripthost" />
|
||||||
|
/// <reference lib="dom.iterable" />
|
@ -0,0 +1,71 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
declare namespace Intl { |
||||||
|
|
||||||
|
// http://cldr.unicode.org/index/cldr-spec/plural-rules#TOC-Determining-Plural-Categories
|
||||||
|
type LDMLPluralRule = "zero" | "one" | "two" | "few" | "many" | "other"; |
||||||
|
type PluralRuleType = "cardinal" | "ordinal"; |
||||||
|
|
||||||
|
interface PluralRulesOptions { |
||||||
|
localeMatcher?: "lookup" | "best fit" | undefined; |
||||||
|
type?: PluralRuleType | undefined; |
||||||
|
minimumIntegerDigits?: number | undefined; |
||||||
|
minimumFractionDigits?: number | undefined; |
||||||
|
maximumFractionDigits?: number | undefined; |
||||||
|
minimumSignificantDigits?: number | undefined; |
||||||
|
maximumSignificantDigits?: number | undefined; |
||||||
|
} |
||||||
|
|
||||||
|
interface ResolvedPluralRulesOptions { |
||||||
|
locale: string; |
||||||
|
pluralCategories: LDMLPluralRule[]; |
||||||
|
type: PluralRuleType; |
||||||
|
minimumIntegerDigits: number; |
||||||
|
minimumFractionDigits: number; |
||||||
|
maximumFractionDigits: number; |
||||||
|
minimumSignificantDigits?: number; |
||||||
|
maximumSignificantDigits?: number; |
||||||
|
} |
||||||
|
|
||||||
|
interface PluralRules { |
||||||
|
resolvedOptions(): ResolvedPluralRulesOptions; |
||||||
|
select(n: number): LDMLPluralRule; |
||||||
|
} |
||||||
|
|
||||||
|
const PluralRules: { |
||||||
|
new (locales?: string | string[], options?: PluralRulesOptions): PluralRules; |
||||||
|
(locales?: string | string[], options?: PluralRulesOptions): PluralRules; |
||||||
|
|
||||||
|
supportedLocalesOf(locales: string | string[], options?: { localeMatcher?: "lookup" | "best fit" }): string[]; |
||||||
|
}; |
||||||
|
|
||||||
|
// We can only have one definition for 'type' in TypeScript, and so you can learn where the keys come from here:
|
||||||
|
type ES2018NumberFormatPartType = "literal" | "nan" | "infinity" | "percent" | "integer" | "group" | "decimal" | "fraction" | "plusSign" | "minusSign" | "percentSign" | "currency" | "code" | "symbol" | "name"; |
||||||
|
type ES2020NumberFormatPartType = "compact" | "exponentInteger" | "exponentMinusSign" | "exponentSeparator" | "unit" | "unknown"; |
||||||
|
type NumberFormatPartTypes = ES2018NumberFormatPartType | ES2020NumberFormatPartType; |
||||||
|
|
||||||
|
interface NumberFormatPart { |
||||||
|
type: NumberFormatPartTypes; |
||||||
|
value: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface NumberFormat { |
||||||
|
formatToParts(number?: number | bigint): NumberFormatPart[]; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/** |
||||||
|
* Represents the completion of an asynchronous operation |
||||||
|
*/ |
||||||
|
interface Promise<T> { |
||||||
|
/** |
||||||
|
* Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The |
||||||
|
* resolved value cannot be modified from the callback. |
||||||
|
* @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). |
||||||
|
* @returns A Promise for the completion of the callback. |
||||||
|
*/ |
||||||
|
finally(onfinally?: (() => void) | undefined | null): Promise<T> |
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface RegExpMatchArray { |
||||||
|
groups?: { |
||||||
|
[key: string]: string |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
interface RegExpExecArray { |
||||||
|
groups?: { |
||||||
|
[key: string]: string |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
interface RegExp { |
||||||
|
/** |
||||||
|
* Returns a Boolean value indicating the state of the dotAll flag (s) used with a regular expression. |
||||||
|
* Default is false. Read-only. |
||||||
|
*/ |
||||||
|
readonly dotAll: boolean; |
||||||
|
} |
@ -0,0 +1,83 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
type FlatArray<Arr, Depth extends number> = { |
||||||
|
"done": Arr, |
||||||
|
"recur": Arr extends ReadonlyArray<infer InnerArr> |
||||||
|
? FlatArray<InnerArr, [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20][Depth]> |
||||||
|
: Arr |
||||||
|
}[Depth extends -1 ? "done" : "recur"]; |
||||||
|
|
||||||
|
interface ReadonlyArray<T> { |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls a defined callback function on each element of an array. Then, flattens the result into |
||||||
|
* a new array. |
||||||
|
* This is identical to a map followed by flat with depth 1. |
||||||
|
* |
||||||
|
* @param callback A function that accepts up to three arguments. The flatMap method calls the |
||||||
|
* callback function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the callback function. If |
||||||
|
* thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
flatMap<U, This = undefined> ( |
||||||
|
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>, |
||||||
|
thisArg?: This |
||||||
|
): U[] |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a new array with all sub-array elements concatenated into it recursively up to the |
||||||
|
* specified depth. |
||||||
|
* |
||||||
|
* @param depth The maximum recursion depth |
||||||
|
*/ |
||||||
|
flat<A, D extends number = 1>( |
||||||
|
this: A, |
||||||
|
depth?: D |
||||||
|
): FlatArray<A, D>[] |
||||||
|
} |
||||||
|
|
||||||
|
interface Array<T> { |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls a defined callback function on each element of an array. Then, flattens the result into |
||||||
|
* a new array. |
||||||
|
* This is identical to a map followed by flat with depth 1. |
||||||
|
* |
||||||
|
* @param callback A function that accepts up to three arguments. The flatMap method calls the |
||||||
|
* callback function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the callback function. If |
||||||
|
* thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
flatMap<U, This = undefined> ( |
||||||
|
callback: (this: This, value: T, index: number, array: T[]) => U | ReadonlyArray<U>, |
||||||
|
thisArg?: This |
||||||
|
): U[] |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a new array with all sub-array elements concatenated into it recursively up to the |
||||||
|
* specified depth. |
||||||
|
* |
||||||
|
* @param depth The maximum recursion depth |
||||||
|
*/ |
||||||
|
flat<A, D extends number = 1>( |
||||||
|
this: A, |
||||||
|
depth?: D |
||||||
|
): FlatArray<A, D>[] |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2018" />
|
||||||
|
/// <reference lib="es2019.array" />
|
||||||
|
/// <reference lib="es2019.object" />
|
||||||
|
/// <reference lib="es2019.string" />
|
||||||
|
/// <reference lib="es2019.symbol" />
|
||||||
|
/// <reference lib="es2019.intl" />
|
@ -0,0 +1,23 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2019" />
|
||||||
|
/// <reference lib="dom" />
|
||||||
|
/// <reference lib="webworker.importscripts" />
|
||||||
|
/// <reference lib="scripthost" />
|
||||||
|
/// <reference lib="dom.iterable" />
|
@ -0,0 +1,23 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
declare namespace Intl { |
||||||
|
interface DateTimeFormatPartTypesRegistry { |
||||||
|
unknown: any |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,33 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2015.iterable" />
|
||||||
|
|
||||||
|
interface ObjectConstructor { |
||||||
|
/** |
||||||
|
* Returns an object created by key-value entries for properties and methods |
||||||
|
* @param entries An iterable object that contains key-value entries for properties and methods. |
||||||
|
*/ |
||||||
|
fromEntries<T = any>(entries: Iterable<readonly [PropertyKey, T]>): { [k: string]: T }; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns an object created by key-value entries for properties and methods |
||||||
|
* @param entries An iterable object that contains key-value entries for properties and methods. |
||||||
|
*/ |
||||||
|
fromEntries(entries: Iterable<readonly any[]>): any; |
||||||
|
} |
@ -0,0 +1,37 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface String { |
||||||
|
/** Removes the trailing white space and line terminator characters from a string. */ |
||||||
|
trimEnd(): string; |
||||||
|
|
||||||
|
/** Removes the leading white space and line terminator characters from a string. */ |
||||||
|
trimStart(): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Removes the leading white space and line terminator characters from a string. |
||||||
|
* @deprecated A legacy feature for browser compatibility. Use `trimStart` instead |
||||||
|
*/ |
||||||
|
trimLeft(): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Removes the trailing white space and line terminator characters from a string. |
||||||
|
* @deprecated A legacy feature for browser compatibility. Use `trimEnd` instead |
||||||
|
*/ |
||||||
|
trimRight(): string; |
||||||
|
} |
@ -0,0 +1,24 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
interface Symbol { |
||||||
|
/** |
||||||
|
* Expose the [[Description]] internal slot of a symbol directly. |
||||||
|
*/ |
||||||
|
readonly description: string | undefined; |
||||||
|
} |
@ -0,0 +1,728 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2020.intl" />
|
||||||
|
|
||||||
|
interface BigIntToLocaleStringOptions { |
||||||
|
/** |
||||||
|
* The locale matching algorithm to use.The default is "best fit". For information about this option, see the {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation Intl page}.
|
||||||
|
*/ |
||||||
|
localeMatcher?: string; |
||||||
|
/** |
||||||
|
* The formatting style to use , the default is "decimal". |
||||||
|
*/ |
||||||
|
style?: string; |
||||||
|
|
||||||
|
numberingSystem?: string; |
||||||
|
/** |
||||||
|
* The unit to use in unit formatting, Possible values are core unit identifiers, defined in UTS #35, Part 2, Section 6. A subset of units from the full list was selected for use in ECMAScript. Pairs of simple units can be concatenated with "-per-" to make a compound unit. There is no default value; if the style is "unit", the unit property must be provided. |
||||||
|
*/ |
||||||
|
unit?: string; |
||||||
|
|
||||||
|
/** |
||||||
|
* The unit formatting style to use in unit formatting, the defaults is "short". |
||||||
|
*/ |
||||||
|
unitDisplay?: string; |
||||||
|
|
||||||
|
/** |
||||||
|
* The currency to use in currency formatting. Possible values are the ISO 4217 currency codes, such as "USD" for the US dollar, "EUR" for the euro, or "CNY" for the Chinese RMB — see the Current currency & funds code list. There is no default value; if the style is "currency", the currency property must be provided. It is only used when [[Style]] has the value "currency". |
||||||
|
*/ |
||||||
|
currency?: string; |
||||||
|
|
||||||
|
/** |
||||||
|
* How to display the currency in currency formatting. It is only used when [[Style]] has the value "currency". The default is "symbol". |
||||||
|
* |
||||||
|
* "symbol" to use a localized currency symbol such as €, |
||||||
|
* |
||||||
|
* "code" to use the ISO currency code, |
||||||
|
* |
||||||
|
* "name" to use a localized currency name such as "dollar" |
||||||
|
*/ |
||||||
|
currencyDisplay?: string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Whether to use grouping separators, such as thousands separators or thousand/lakh/crore separators. The default is true. |
||||||
|
*/ |
||||||
|
useGrouping?: boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* The minimum number of integer digits to use. Possible values are from 1 to 21; the default is 1. |
||||||
|
*/ |
||||||
|
minimumIntegerDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; |
||||||
|
|
||||||
|
/** |
||||||
|
* The minimum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number and percent formatting is 0; the default for currency formatting is the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information).
|
||||||
|
*/ |
||||||
|
minimumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; |
||||||
|
|
||||||
|
/** |
||||||
|
* The maximum number of fraction digits to use. Possible values are from 0 to 20; the default for plain number formatting is the larger of minimumFractionDigits and 3; the default for currency formatting is the larger of minimumFractionDigits and the number of minor unit digits provided by the {@link http://www.currency-iso.org/en/home/tables/table-a1.html ISO 4217 currency codes list} (2 if the list doesn't provide that information); the default for percent formatting is the larger of minimumFractionDigits and 0.
|
||||||
|
*/ |
||||||
|
maximumFractionDigits?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20; |
||||||
|
|
||||||
|
/** |
||||||
|
* The minimum number of significant digits to use. Possible values are from 1 to 21; the default is 1. |
||||||
|
*/ |
||||||
|
minimumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; |
||||||
|
|
||||||
|
/** |
||||||
|
* The maximum number of significant digits to use. Possible values are from 1 to 21; the default is 21. |
||||||
|
*/ |
||||||
|
maximumSignificantDigits?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21; |
||||||
|
|
||||||
|
/** |
||||||
|
* The formatting that should be displayed for the number, the defaults is "standard" |
||||||
|
* |
||||||
|
* "standard" plain number formatting |
||||||
|
* |
||||||
|
* "scientific" return the order-of-magnitude for formatted number. |
||||||
|
* |
||||||
|
* "engineering" return the exponent of ten when divisible by three |
||||||
|
* |
||||||
|
* "compact" string representing exponent, defaults is using the "short" form |
||||||
|
*/ |
||||||
|
notation?: string; |
||||||
|
|
||||||
|
/** |
||||||
|
* used only when notation is "compact" |
||||||
|
*/ |
||||||
|
compactDisplay?: string; |
||||||
|
} |
||||||
|
|
||||||
|
interface BigInt { |
||||||
|
/** |
||||||
|
* Returns a string representation of an object. |
||||||
|
* @param radix Specifies a radix for converting numeric values to strings. |
||||||
|
*/ |
||||||
|
toString(radix?: number): string; |
||||||
|
|
||||||
|
/** Returns a string representation appropriate to the host environment's current locale. */ |
||||||
|
toLocaleString(locales?: Intl.LocalesArgument, options?: BigIntToLocaleStringOptions): string; |
||||||
|
|
||||||
|
/** Returns the primitive value of the specified object. */ |
||||||
|
valueOf(): bigint; |
||||||
|
|
||||||
|
readonly [Symbol.toStringTag]: "BigInt"; |
||||||
|
} |
||||||
|
|
||||||
|
interface BigIntConstructor { |
||||||
|
(value: bigint | boolean | number | string): bigint; |
||||||
|
readonly prototype: BigInt; |
||||||
|
|
||||||
|
/** |
||||||
|
* Interprets the low bits of a BigInt as a 2's-complement signed integer. |
||||||
|
* All higher bits are discarded. |
||||||
|
* @param bits The number of low bits to use |
||||||
|
* @param int The BigInt whose bits to extract |
||||||
|
*/ |
||||||
|
asIntN(bits: number, int: bigint): bigint; |
||||||
|
/** |
||||||
|
* Interprets the low bits of a BigInt as an unsigned integer. |
||||||
|
* All higher bits are discarded. |
||||||
|
* @param bits The number of low bits to use |
||||||
|
* @param int The BigInt whose bits to extract |
||||||
|
*/ |
||||||
|
asUintN(bits: number, int: bigint): bigint; |
||||||
|
} |
||||||
|
|
||||||
|
declare var BigInt: BigIntConstructor; |
||||||
|
|
||||||
|
/** |
||||||
|
* A typed array of 64-bit signed integer values. The contents are initialized to 0. If the |
||||||
|
* requested number of bytes could not be allocated, an exception is raised. |
||||||
|
*/ |
||||||
|
interface BigInt64Array { |
||||||
|
/** The size in bytes of each element in the array. */ |
||||||
|
readonly BYTES_PER_ELEMENT: number; |
||||||
|
|
||||||
|
/** The ArrayBuffer instance referenced by the array. */ |
||||||
|
readonly buffer: ArrayBufferLike; |
||||||
|
|
||||||
|
/** The length in bytes of the array. */ |
||||||
|
readonly byteLength: number; |
||||||
|
|
||||||
|
/** The offset in bytes of the array. */ |
||||||
|
readonly byteOffset: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the this object after copying a section of the array identified by start and end |
||||||
|
* to the same array starting at position target |
||||||
|
* @param target If target is negative, it is treated as length+target where length is the |
||||||
|
* length of the array. |
||||||
|
* @param start If start is negative, it is treated as length+start. If end is negative, it |
||||||
|
* is treated as length+end. |
||||||
|
* @param end If not specified, length of the this object is used as its default value. |
||||||
|
*/ |
||||||
|
copyWithin(target: number, start: number, end?: number): this; |
||||||
|
|
||||||
|
/** Yields index, value pairs for every entry in the array. */ |
||||||
|
entries(): IterableIterator<[number, bigint]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Determines whether all the members of an array satisfy the specified test. |
||||||
|
* @param predicate A function that accepts up to three arguments. The every method calls |
||||||
|
* the predicate function for each element in the array until the predicate returns false, |
||||||
|
* or until the end of the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the predicate function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
every(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array |
||||||
|
* @param value value to fill array section with |
||||||
|
* @param start index to start filling the array at. If start is negative, it is treated as |
||||||
|
* length+start where length is the length of the array. |
||||||
|
* @param end index to stop filling the array at. If end is negative, it is treated as |
||||||
|
* length+end. |
||||||
|
*/ |
||||||
|
fill(value: bigint, start?: number, end?: number): this; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the elements of an array that meet the condition specified in a callback function. |
||||||
|
* @param predicate A function that accepts up to three arguments. The filter method calls |
||||||
|
* the predicate function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the predicate function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
filter(predicate: (value: bigint, index: number, array: BigInt64Array) => any, thisArg?: any): BigInt64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the value of the first element in the array where predicate is true, and undefined |
||||||
|
* otherwise. |
||||||
|
* @param predicate find calls predicate once for each element of the array, in ascending |
||||||
|
* order, until it finds one where predicate returns true. If such an element is found, find |
||||||
|
* immediately returns that element value. Otherwise, find returns undefined. |
||||||
|
* @param thisArg If provided, it will be used as the this value for each invocation of |
||||||
|
* predicate. If it is not provided, undefined is used instead. |
||||||
|
*/ |
||||||
|
find(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): bigint | undefined; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the index of the first element in the array where predicate is true, and -1 |
||||||
|
* otherwise. |
||||||
|
* @param predicate find calls predicate once for each element of the array, in ascending |
||||||
|
* order, until it finds one where predicate returns true. If such an element is found, |
||||||
|
* findIndex immediately returns that element index. Otherwise, findIndex returns -1. |
||||||
|
* @param thisArg If provided, it will be used as the this value for each invocation of |
||||||
|
* predicate. If it is not provided, undefined is used instead. |
||||||
|
*/ |
||||||
|
findIndex(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Performs the specified action for each element in an array. |
||||||
|
* @param callbackfn A function that accepts up to three arguments. forEach calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
forEach(callbackfn: (value: bigint, index: number, array: BigInt64Array) => void, thisArg?: any): void; |
||||||
|
|
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: bigint, fromIndex?: number): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the index of the first occurrence of a value in an array. |
||||||
|
* @param searchElement The value to locate in the array. |
||||||
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the |
||||||
|
* search starts at index 0. |
||||||
|
*/ |
||||||
|
indexOf(searchElement: bigint, fromIndex?: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds all the elements of an array separated by the specified separator string. |
||||||
|
* @param separator A string used to separate one element of an array from the next in the |
||||||
|
* resulting String. If omitted, the array elements are separated with a comma. |
||||||
|
*/ |
||||||
|
join(separator?: string): string; |
||||||
|
|
||||||
|
/** Yields each index in the array. */ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the index of the last occurrence of a value in an array. |
||||||
|
* @param searchElement The value to locate in the array. |
||||||
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the |
||||||
|
* search starts at index 0. |
||||||
|
*/ |
||||||
|
lastIndexOf(searchElement: bigint, fromIndex?: number): number; |
||||||
|
|
||||||
|
/** The length of the array. */ |
||||||
|
readonly length: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls a defined callback function on each element of an array, and returns an array that |
||||||
|
* contains the results. |
||||||
|
* @param callbackfn A function that accepts up to three arguments. The map method calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
map(callbackfn: (value: bigint, index: number, array: BigInt64Array) => bigint, thisArg?: any): BigInt64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array. The return value of |
||||||
|
* the callback function is the accumulated result, and is provided as an argument in the next |
||||||
|
* call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an argument |
||||||
|
* instead of an array value. |
||||||
|
*/ |
||||||
|
reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array. The return value of |
||||||
|
* the callback function is the accumulated result, and is provided as an argument in the next |
||||||
|
* call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an argument |
||||||
|
* instead of an array value. |
||||||
|
*/ |
||||||
|
reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array, in descending order. |
||||||
|
* The return value of the callback function is the accumulated result, and is provided as an |
||||||
|
* argument in the next call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls |
||||||
|
* the callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an |
||||||
|
* argument instead of an array value. |
||||||
|
*/ |
||||||
|
reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigInt64Array) => bigint): bigint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array, in descending order. |
||||||
|
* The return value of the callback function is the accumulated result, and is provided as an |
||||||
|
* argument in the next call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls |
||||||
|
* the callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an argument |
||||||
|
* instead of an array value. |
||||||
|
*/ |
||||||
|
reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigInt64Array) => U, initialValue: U): U; |
||||||
|
|
||||||
|
/** Reverses the elements in the array. */ |
||||||
|
reverse(): this; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sets a value or an array of values. |
||||||
|
* @param array A typed or untyped array of values to set. |
||||||
|
* @param offset The index in the current array at which the values are to be written. |
||||||
|
*/ |
||||||
|
set(array: ArrayLike<bigint>, offset?: number): void; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a section of an array. |
||||||
|
* @param start The beginning of the specified portion of the array. |
||||||
|
* @param end The end of the specified portion of the array. |
||||||
|
*/ |
||||||
|
slice(start?: number, end?: number): BigInt64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Determines whether the specified callback function returns true for any element of an array. |
||||||
|
* @param predicate A function that accepts up to three arguments. The some method calls the |
||||||
|
* predicate function for each element in the array until the predicate returns true, or until |
||||||
|
* the end of the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the predicate function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
some(predicate: (value: bigint, index: number, array: BigInt64Array) => boolean, thisArg?: any): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sorts the array. |
||||||
|
* @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. |
||||||
|
*/ |
||||||
|
sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; |
||||||
|
|
||||||
|
/** |
||||||
|
* Gets a new BigInt64Array view of the ArrayBuffer store for this array, referencing the elements |
||||||
|
* at begin, inclusive, up to end, exclusive. |
||||||
|
* @param begin The index of the beginning of the array. |
||||||
|
* @param end The index of the end of the array. |
||||||
|
*/ |
||||||
|
subarray(begin?: number, end?: number): BigInt64Array; |
||||||
|
|
||||||
|
/** Converts the array to a string by using the current locale. */ |
||||||
|
toLocaleString(): string; |
||||||
|
|
||||||
|
/** Returns a string representation of the array. */ |
||||||
|
toString(): string; |
||||||
|
|
||||||
|
/** Returns the primitive value of the specified object. */ |
||||||
|
valueOf(): BigInt64Array; |
||||||
|
|
||||||
|
/** Yields each value in the array. */ |
||||||
|
values(): IterableIterator<bigint>; |
||||||
|
|
||||||
|
[Symbol.iterator](): IterableIterator<bigint>; |
||||||
|
|
||||||
|
readonly [Symbol.toStringTag]: "BigInt64Array"; |
||||||
|
|
||||||
|
[index: number]: bigint; |
||||||
|
} |
||||||
|
|
||||||
|
interface BigInt64ArrayConstructor { |
||||||
|
readonly prototype: BigInt64Array; |
||||||
|
new(length?: number): BigInt64Array; |
||||||
|
new(array: Iterable<bigint>): BigInt64Array; |
||||||
|
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigInt64Array; |
||||||
|
|
||||||
|
/** The size in bytes of each element in the array. */ |
||||||
|
readonly BYTES_PER_ELEMENT: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a new array from a set of elements. |
||||||
|
* @param items A set of elements to include in the new array object. |
||||||
|
*/ |
||||||
|
of(...items: bigint[]): BigInt64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: ArrayLike<bigint>): BigInt64Array; |
||||||
|
from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array; |
||||||
|
} |
||||||
|
|
||||||
|
declare var BigInt64Array: BigInt64ArrayConstructor; |
||||||
|
|
||||||
|
/** |
||||||
|
* A typed array of 64-bit unsigned integer values. The contents are initialized to 0. If the |
||||||
|
* requested number of bytes could not be allocated, an exception is raised. |
||||||
|
*/ |
||||||
|
interface BigUint64Array { |
||||||
|
/** The size in bytes of each element in the array. */ |
||||||
|
readonly BYTES_PER_ELEMENT: number; |
||||||
|
|
||||||
|
/** The ArrayBuffer instance referenced by the array. */ |
||||||
|
readonly buffer: ArrayBufferLike; |
||||||
|
|
||||||
|
/** The length in bytes of the array. */ |
||||||
|
readonly byteLength: number; |
||||||
|
|
||||||
|
/** The offset in bytes of the array. */ |
||||||
|
readonly byteOffset: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the this object after copying a section of the array identified by start and end |
||||||
|
* to the same array starting at position target |
||||||
|
* @param target If target is negative, it is treated as length+target where length is the |
||||||
|
* length of the array. |
||||||
|
* @param start If start is negative, it is treated as length+start. If end is negative, it |
||||||
|
* is treated as length+end. |
||||||
|
* @param end If not specified, length of the this object is used as its default value. |
||||||
|
*/ |
||||||
|
copyWithin(target: number, start: number, end?: number): this; |
||||||
|
|
||||||
|
/** Yields index, value pairs for every entry in the array. */ |
||||||
|
entries(): IterableIterator<[number, bigint]>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Determines whether all the members of an array satisfy the specified test. |
||||||
|
* @param predicate A function that accepts up to three arguments. The every method calls |
||||||
|
* the predicate function for each element in the array until the predicate returns false, |
||||||
|
* or until the end of the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the predicate function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
every(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Changes all array elements from `start` to `end` index to a static `value` and returns the modified array |
||||||
|
* @param value value to fill array section with |
||||||
|
* @param start index to start filling the array at. If start is negative, it is treated as |
||||||
|
* length+start where length is the length of the array. |
||||||
|
* @param end index to stop filling the array at. If end is negative, it is treated as |
||||||
|
* length+end. |
||||||
|
*/ |
||||||
|
fill(value: bigint, start?: number, end?: number): this; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the elements of an array that meet the condition specified in a callback function. |
||||||
|
* @param predicate A function that accepts up to three arguments. The filter method calls |
||||||
|
* the predicate function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the predicate function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
filter(predicate: (value: bigint, index: number, array: BigUint64Array) => any, thisArg?: any): BigUint64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the value of the first element in the array where predicate is true, and undefined |
||||||
|
* otherwise. |
||||||
|
* @param predicate find calls predicate once for each element of the array, in ascending |
||||||
|
* order, until it finds one where predicate returns true. If such an element is found, find |
||||||
|
* immediately returns that element value. Otherwise, find returns undefined. |
||||||
|
* @param thisArg If provided, it will be used as the this value for each invocation of |
||||||
|
* predicate. If it is not provided, undefined is used instead. |
||||||
|
*/ |
||||||
|
find(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): bigint | undefined; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the index of the first element in the array where predicate is true, and -1 |
||||||
|
* otherwise. |
||||||
|
* @param predicate find calls predicate once for each element of the array, in ascending |
||||||
|
* order, until it finds one where predicate returns true. If such an element is found, |
||||||
|
* findIndex immediately returns that element index. Otherwise, findIndex returns -1. |
||||||
|
* @param thisArg If provided, it will be used as the this value for each invocation of |
||||||
|
* predicate. If it is not provided, undefined is used instead. |
||||||
|
*/ |
||||||
|
findIndex(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Performs the specified action for each element in an array. |
||||||
|
* @param callbackfn A function that accepts up to three arguments. forEach calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
forEach(callbackfn: (value: bigint, index: number, array: BigUint64Array) => void, thisArg?: any): void; |
||||||
|
|
||||||
|
/** |
||||||
|
* Determines whether an array includes a certain element, returning true or false as appropriate. |
||||||
|
* @param searchElement The element to search for. |
||||||
|
* @param fromIndex The position in this array at which to begin searching for searchElement. |
||||||
|
*/ |
||||||
|
includes(searchElement: bigint, fromIndex?: number): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the index of the first occurrence of a value in an array. |
||||||
|
* @param searchElement The value to locate in the array. |
||||||
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the |
||||||
|
* search starts at index 0. |
||||||
|
*/ |
||||||
|
indexOf(searchElement: bigint, fromIndex?: number): number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Adds all the elements of an array separated by the specified separator string. |
||||||
|
* @param separator A string used to separate one element of an array from the next in the |
||||||
|
* resulting String. If omitted, the array elements are separated with a comma. |
||||||
|
*/ |
||||||
|
join(separator?: string): string; |
||||||
|
|
||||||
|
/** Yields each index in the array. */ |
||||||
|
keys(): IterableIterator<number>; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns the index of the last occurrence of a value in an array. |
||||||
|
* @param searchElement The value to locate in the array. |
||||||
|
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the |
||||||
|
* search starts at index 0. |
||||||
|
*/ |
||||||
|
lastIndexOf(searchElement: bigint, fromIndex?: number): number; |
||||||
|
|
||||||
|
/** The length of the array. */ |
||||||
|
readonly length: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls a defined callback function on each element of an array, and returns an array that |
||||||
|
* contains the results. |
||||||
|
* @param callbackfn A function that accepts up to three arguments. The map method calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
map(callbackfn: (value: bigint, index: number, array: BigUint64Array) => bigint, thisArg?: any): BigUint64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array. The return value of |
||||||
|
* the callback function is the accumulated result, and is provided as an argument in the next |
||||||
|
* call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an argument |
||||||
|
* instead of an array value. |
||||||
|
*/ |
||||||
|
reduce(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array. The return value of |
||||||
|
* the callback function is the accumulated result, and is provided as an argument in the next |
||||||
|
* call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the |
||||||
|
* callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an argument |
||||||
|
* instead of an array value. |
||||||
|
*/ |
||||||
|
reduce<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array, in descending order. |
||||||
|
* The return value of the callback function is the accumulated result, and is provided as an |
||||||
|
* argument in the next call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls |
||||||
|
* the callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an |
||||||
|
* argument instead of an array value. |
||||||
|
*/ |
||||||
|
reduceRight(callbackfn: (previousValue: bigint, currentValue: bigint, currentIndex: number, array: BigUint64Array) => bigint): bigint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Calls the specified callback function for all the elements in an array, in descending order. |
||||||
|
* The return value of the callback function is the accumulated result, and is provided as an |
||||||
|
* argument in the next call to the callback function. |
||||||
|
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls |
||||||
|
* the callbackfn function one time for each element in the array. |
||||||
|
* @param initialValue If initialValue is specified, it is used as the initial value to start |
||||||
|
* the accumulation. The first call to the callbackfn function provides this value as an argument |
||||||
|
* instead of an array value. |
||||||
|
*/ |
||||||
|
reduceRight<U>(callbackfn: (previousValue: U, currentValue: bigint, currentIndex: number, array: BigUint64Array) => U, initialValue: U): U; |
||||||
|
|
||||||
|
/** Reverses the elements in the array. */ |
||||||
|
reverse(): this; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sets a value or an array of values. |
||||||
|
* @param array A typed or untyped array of values to set. |
||||||
|
* @param offset The index in the current array at which the values are to be written. |
||||||
|
*/ |
||||||
|
set(array: ArrayLike<bigint>, offset?: number): void; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a section of an array. |
||||||
|
* @param start The beginning of the specified portion of the array. |
||||||
|
* @param end The end of the specified portion of the array. |
||||||
|
*/ |
||||||
|
slice(start?: number, end?: number): BigUint64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Determines whether the specified callback function returns true for any element of an array. |
||||||
|
* @param predicate A function that accepts up to three arguments. The some method calls the |
||||||
|
* predicate function for each element in the array until the predicate returns true, or until |
||||||
|
* the end of the array. |
||||||
|
* @param thisArg An object to which the this keyword can refer in the predicate function. |
||||||
|
* If thisArg is omitted, undefined is used as the this value. |
||||||
|
*/ |
||||||
|
some(predicate: (value: bigint, index: number, array: BigUint64Array) => boolean, thisArg?: any): boolean; |
||||||
|
|
||||||
|
/** |
||||||
|
* Sorts the array. |
||||||
|
* @param compareFn The function used to determine the order of the elements. If omitted, the elements are sorted in ascending order. |
||||||
|
*/ |
||||||
|
sort(compareFn?: (a: bigint, b: bigint) => number | bigint): this; |
||||||
|
|
||||||
|
/** |
||||||
|
* Gets a new BigUint64Array view of the ArrayBuffer store for this array, referencing the elements |
||||||
|
* at begin, inclusive, up to end, exclusive. |
||||||
|
* @param begin The index of the beginning of the array. |
||||||
|
* @param end The index of the end of the array. |
||||||
|
*/ |
||||||
|
subarray(begin?: number, end?: number): BigUint64Array; |
||||||
|
|
||||||
|
/** Converts the array to a string by using the current locale. */ |
||||||
|
toLocaleString(): string; |
||||||
|
|
||||||
|
/** Returns a string representation of the array. */ |
||||||
|
toString(): string; |
||||||
|
|
||||||
|
/** Returns the primitive value of the specified object. */ |
||||||
|
valueOf(): BigUint64Array; |
||||||
|
|
||||||
|
/** Yields each value in the array. */ |
||||||
|
values(): IterableIterator<bigint>; |
||||||
|
|
||||||
|
[Symbol.iterator](): IterableIterator<bigint>; |
||||||
|
|
||||||
|
readonly [Symbol.toStringTag]: "BigUint64Array"; |
||||||
|
|
||||||
|
[index: number]: bigint; |
||||||
|
} |
||||||
|
|
||||||
|
interface BigUint64ArrayConstructor { |
||||||
|
readonly prototype: BigUint64Array; |
||||||
|
new(length?: number): BigUint64Array; |
||||||
|
new(array: Iterable<bigint>): BigUint64Array; |
||||||
|
new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): BigUint64Array; |
||||||
|
|
||||||
|
/** The size in bytes of each element in the array. */ |
||||||
|
readonly BYTES_PER_ELEMENT: number; |
||||||
|
|
||||||
|
/** |
||||||
|
* Returns a new array from a set of elements. |
||||||
|
* @param items A set of elements to include in the new array object. |
||||||
|
*/ |
||||||
|
of(...items: bigint[]): BigUint64Array; |
||||||
|
|
||||||
|
/** |
||||||
|
* Creates an array from an array-like or iterable object. |
||||||
|
* @param arrayLike An array-like or iterable object to convert to an array. |
||||||
|
* @param mapfn A mapping function to call on every element of the array. |
||||||
|
* @param thisArg Value of 'this' used to invoke the mapfn. |
||||||
|
*/ |
||||||
|
from(arrayLike: ArrayLike<bigint>): BigUint64Array; |
||||||
|
from<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array; |
||||||
|
} |
||||||
|
|
||||||
|
declare var BigUint64Array: BigUint64ArrayConstructor; |
||||||
|
|
||||||
|
interface DataView { |
||||||
|
/** |
||||||
|
* Gets the BigInt64 value at the specified byte offset from the start of the view. There is |
||||||
|
* no alignment constraint; multi-byte values may be fetched from any offset. |
||||||
|
* @param byteOffset The place in the buffer at which the value should be retrieved. |
||||||
|
* @param littleEndian If false or undefined, a big-endian value should be read. |
||||||
|
*/ |
||||||
|
getBigInt64(byteOffset: number, littleEndian?: boolean): bigint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Gets the BigUint64 value at the specified byte offset from the start of the view. There is |
||||||
|
* no alignment constraint; multi-byte values may be fetched from any offset. |
||||||
|
* @param byteOffset The place in the buffer at which the value should be retrieved. |
||||||
|
* @param littleEndian If false or undefined, a big-endian value should be read. |
||||||
|
*/ |
||||||
|
getBigUint64(byteOffset: number, littleEndian?: boolean): bigint; |
||||||
|
|
||||||
|
/** |
||||||
|
* Stores a BigInt64 value at the specified byte offset from the start of the view. |
||||||
|
* @param byteOffset The place in the buffer at which the value should be set. |
||||||
|
* @param value The value to set. |
||||||
|
* @param littleEndian If false or undefined, a big-endian value should be written. |
||||||
|
*/ |
||||||
|
setBigInt64(byteOffset: number, value: bigint, littleEndian?: boolean): void; |
||||||
|
|
||||||
|
/** |
||||||
|
* Stores a BigUint64 value at the specified byte offset from the start of the view. |
||||||
|
* @param byteOffset The place in the buffer at which the value should be set. |
||||||
|
* @param value The value to set. |
||||||
|
* @param littleEndian If false or undefined, a big-endian value should be written. |
||||||
|
*/ |
||||||
|
setBigUint64(byteOffset: number, value: bigint, littleEndian?: boolean): void; |
||||||
|
} |
||||||
|
|
||||||
|
declare namespace Intl{ |
||||||
|
interface NumberFormat { |
||||||
|
format(value: number | bigint): string; |
||||||
|
resolvedOptions(): ResolvedNumberFormatOptions; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2019" />
|
||||||
|
/// <reference lib="es2020.bigint" />
|
||||||
|
/// <reference lib="es2020.date" />
|
||||||
|
/// <reference lib="es2020.number" />
|
||||||
|
/// <reference lib="es2020.promise" />
|
||||||
|
/// <reference lib="es2020.sharedmemory" />
|
||||||
|
/// <reference lib="es2020.string" />
|
||||||
|
/// <reference lib="es2020.symbol.wellknown" />
|
||||||
|
/// <reference lib="es2020.intl" />
|
@ -0,0 +1,42 @@ |
|||||||
|
/*! ***************************************************************************** |
||||||
|
Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use |
||||||
|
this file except in compliance with the License. You may obtain a copy of the |
||||||
|
License at http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
||||||
|
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED |
||||||
|
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, |
||||||
|
MERCHANTABLITY OR NON-INFRINGEMENT. |
||||||
|
|
||||||
|
See the Apache Version 2.0 License for specific language governing permissions |
||||||
|
and limitations under the License. |
||||||
|
***************************************************************************** */ |
||||||
|
|
||||||
|
|
||||||
|
/// <reference no-default-lib="true"/>
|
||||||
|
|
||||||
|
/// <reference lib="es2020.intl" />
|
||||||
|
|
||||||
|
interface Date { |
||||||
|
/** |
||||||
|
* Converts a date and time to a string by using the current or specified locale. |
||||||
|
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. |
||||||
|
* @param options An object that contains one or more properties that specify comparison options. |
||||||
|
*/ |
||||||
|
toLocaleString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Converts a date to a string by using the current or specified locale. |
||||||
|
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. |
||||||
|
* @param options An object that contains one or more properties that specify comparison options. |
||||||
|
*/ |
||||||
|
toLocaleDateString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; |
||||||
|
|
||||||
|
/** |
||||||
|
* Converts a time to a string by using the current or specified locale. |
||||||
|
* @param locales A locale string, array of locale strings, Intl.Locale object, or array of Intl.Locale objects that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. |
||||||
|
* @param options An object that contains one or more properties that specify comparison options. |
||||||
|
*/ |
||||||
|
toLocaleTimeString(locales?: Intl.LocalesArgument, options?: Intl.DateTimeFormatOptions): string; |
||||||
|
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue