remove unused packages
This commit is contained in:
parent
5123289b0c
commit
a65c341690
@ -1,53 +0,0 @@
|
|||||||
// Package bundled provides access to files bundled with TypeScript.
|
|
||||||
package bundled
|
|
||||||
|
|
||||||
import (
|
|
||||||
"path/filepath"
|
|
||||||
"runtime"
|
|
||||||
"sync"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/tspath"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/vfs"
|
|
||||||
)
|
|
||||||
|
|
||||||
//go:generate go run generate.go
|
|
||||||
|
|
||||||
// Define the below here to consolidate documentation.
|
|
||||||
|
|
||||||
// Embedded is true if the bundled files are implemented through an embedded FS.
|
|
||||||
const Embedded = embedded
|
|
||||||
|
|
||||||
// WrapFS returns an FS which redirects embedded paths to the embedded file system.
|
|
||||||
// If the embedded file system is not available, it returns the original FS.
|
|
||||||
func WrapFS(fs vfs.FS) vfs.FS {
|
|
||||||
return wrapFS(fs)
|
|
||||||
}
|
|
||||||
|
|
||||||
// LibPath returns the path to the directory containing the bundled lib.d.ts files.
|
|
||||||
// If embedding is not enabled, this is a path on disk, and must be accessed through
|
|
||||||
// a real OS filesystem.
|
|
||||||
func LibPath() string {
|
|
||||||
return libPath()
|
|
||||||
}
|
|
||||||
|
|
||||||
var bundledSourceDir = sync.OnceValue(func() string {
|
|
||||||
_, filename, _, ok := runtime.Caller(0)
|
|
||||||
if !ok {
|
|
||||||
panic("bundled: could not get current filename")
|
|
||||||
}
|
|
||||||
return filepath.Dir(filepath.FromSlash(filename))
|
|
||||||
})
|
|
||||||
|
|
||||||
var testingLibPath = sync.OnceValue(func() string {
|
|
||||||
if !testing.Testing() {
|
|
||||||
panic("bundled: TestingLibPath should only be called during tests")
|
|
||||||
}
|
|
||||||
return tspath.NormalizeSlashes(filepath.Join(bundledSourceDir(), "libs"))
|
|
||||||
})
|
|
||||||
|
|
||||||
// TestingLibPath returns the path to the source bundled libs directory.
|
|
||||||
// It's only valid to use in tests where the source code is available.
|
|
||||||
func TestingLibPath() string {
|
|
||||||
return testingLibPath()
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
package bundled_test
|
|
||||||
|
|
||||||
import (
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/bundled"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/tspath"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/vfs"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/vfs/osvfs"
|
|
||||||
"gotest.tools/v3/assert"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestTestingLibPath(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
p := bundled.TestingLibPath()
|
|
||||||
|
|
||||||
_, err := os.Stat(p)
|
|
||||||
assert.NilError(t, err)
|
|
||||||
|
|
||||||
libdts := filepath.Join(p, "lib.d.ts")
|
|
||||||
|
|
||||||
_, err = os.Stat(libdts)
|
|
||||||
assert.NilError(t, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestEmbeddedLibs(t *testing.T) {
|
|
||||||
t.Parallel()
|
|
||||||
|
|
||||||
fs := bundled.WrapFS(osvfs.FS())
|
|
||||||
|
|
||||||
var files []string
|
|
||||||
|
|
||||||
err := fs.WalkDir(bundled.LibPath(), func(path string, d vfs.DirEntry, err error) error {
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if !d.IsDir() {
|
|
||||||
files = append(files, tspath.GetBaseFileName(path))
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
})
|
|
||||||
assert.NilError(t, err)
|
|
||||||
|
|
||||||
assert.DeepEqual(t, files, bundled.LibNames)
|
|
||||||
}
|
|
||||||
@ -1,212 +0,0 @@
|
|||||||
//go:build !noembed
|
|
||||||
|
|
||||||
package bundled
|
|
||||||
|
|
||||||
import (
|
|
||||||
"io/fs"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/vfs"
|
|
||||||
)
|
|
||||||
|
|
||||||
const embedded = true
|
|
||||||
|
|
||||||
const scheme = "bundled:///"
|
|
||||||
|
|
||||||
func splitPath(path string) (rest string, ok bool) {
|
|
||||||
return strings.CutPrefix(path, scheme)
|
|
||||||
}
|
|
||||||
|
|
||||||
func libPath() string {
|
|
||||||
return scheme + "libs"
|
|
||||||
}
|
|
||||||
|
|
||||||
// wrappedFS is implemented directly rather than going through [io/fs.FS].
|
|
||||||
// Our vfs.FS works with file contents in terms of strings, and that's
|
|
||||||
// what go:embed does under the hood, but going through fs.FS will cause
|
|
||||||
// copying to []byte and back.
|
|
||||||
|
|
||||||
type wrappedFS struct {
|
|
||||||
fs vfs.FS
|
|
||||||
}
|
|
||||||
|
|
||||||
var _ vfs.FS = (*wrappedFS)(nil)
|
|
||||||
|
|
||||||
func wrapFS(fs vfs.FS) vfs.FS {
|
|
||||||
return &wrappedFS{fs: fs}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) UseCaseSensitiveFileNames() bool {
|
|
||||||
return vfs.fs.UseCaseSensitiveFileNames()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) FileExists(path string) bool {
|
|
||||||
if rest, ok := splitPath(path); ok {
|
|
||||||
_, ok := embeddedContents[rest]
|
|
||||||
return ok
|
|
||||||
}
|
|
||||||
return vfs.fs.FileExists(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) ReadFile(path string) (contents string, ok bool) {
|
|
||||||
if rest, ok := splitPath(path); ok {
|
|
||||||
contents, ok = embeddedContents[rest]
|
|
||||||
return contents, ok
|
|
||||||
}
|
|
||||||
return vfs.fs.ReadFile(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) DirectoryExists(path string) bool {
|
|
||||||
if rest, ok := splitPath(path); ok {
|
|
||||||
return rest == "libs"
|
|
||||||
}
|
|
||||||
return vfs.fs.DirectoryExists(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) GetAccessibleEntries(path string) (result vfs.Entries) {
|
|
||||||
if rest, ok := splitPath(path); ok {
|
|
||||||
if rest == "" {
|
|
||||||
result.Directories = []string{"libs"}
|
|
||||||
} else if rest == "libs" {
|
|
||||||
result.Files = LibNames
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
return vfs.fs.GetAccessibleEntries(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
var rootEntries = []fs.DirEntry{
|
|
||||||
fs.FileInfoToDirEntry(&fileInfo{name: "libs", mode: fs.ModeDir}),
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) Stat(path string) vfs.FileInfo {
|
|
||||||
if rest, ok := splitPath(path); ok {
|
|
||||||
if rest == "" || rest == "libs" {
|
|
||||||
return &fileInfo{name: rest, mode: fs.ModeDir}
|
|
||||||
}
|
|
||||||
if lib, ok := embeddedContents[rest]; ok {
|
|
||||||
libName, _ := strings.CutPrefix(rest, "libs/")
|
|
||||||
return &fileInfo{name: libName, size: int64(len(lib))}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return vfs.fs.Stat(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) WalkDir(root string, walkFn vfs.WalkDirFunc) error {
|
|
||||||
if rest, ok := splitPath(root); ok {
|
|
||||||
if err := vfs.walkDir(rest, walkFn); err != nil {
|
|
||||||
if err == fs.SkipAll { //nolint:errorlint
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return vfs.fs.WalkDir(root, walkFn)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) walkDir(rest string, walkFn vfs.WalkDirFunc) error {
|
|
||||||
var entries []fs.DirEntry
|
|
||||||
switch rest {
|
|
||||||
case "":
|
|
||||||
entries = rootEntries
|
|
||||||
case "libs":
|
|
||||||
entries = libsEntries
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, entry := range entries {
|
|
||||||
name := rest + "/" + entry.Name()
|
|
||||||
|
|
||||||
if err := walkFn(scheme+name, entry, nil); err != nil {
|
|
||||||
if err == fs.SkipAll { //nolint:errorlint
|
|
||||||
return fs.SkipAll
|
|
||||||
}
|
|
||||||
if err == fs.SkipDir { //nolint:errorlint
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
if entry.IsDir() {
|
|
||||||
if err := vfs.walkDir(name, walkFn); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) Realpath(path string) string {
|
|
||||||
if _, ok := splitPath(path); ok {
|
|
||||||
return path
|
|
||||||
}
|
|
||||||
return vfs.fs.Realpath(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) WriteFile(path string, data string, writeByteOrderMark bool) error {
|
|
||||||
if _, ok := splitPath(path); ok {
|
|
||||||
panic("cannot write to embedded file system")
|
|
||||||
}
|
|
||||||
return vfs.fs.WriteFile(path, data, writeByteOrderMark)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) Remove(path string) error {
|
|
||||||
if _, ok := splitPath(path); ok {
|
|
||||||
panic("cannot remove from embedded file system")
|
|
||||||
}
|
|
||||||
return vfs.fs.Remove(path)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (vfs *wrappedFS) Chtimes(path string, aTime time.Time, mTime time.Time) error {
|
|
||||||
if _, ok := splitPath(path); ok {
|
|
||||||
panic("cannot change times on embedded file system")
|
|
||||||
}
|
|
||||||
return vfs.fs.Chtimes(path, aTime, mTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
type fileInfo struct {
|
|
||||||
mode fs.FileMode
|
|
||||||
name string
|
|
||||||
size int64
|
|
||||||
}
|
|
||||||
|
|
||||||
var (
|
|
||||||
_ fs.FileInfo = (*fileInfo)(nil)
|
|
||||||
_ fs.DirEntry = (*fileInfo)(nil)
|
|
||||||
)
|
|
||||||
|
|
||||||
func (fi *fileInfo) IsDir() bool {
|
|
||||||
return fi.mode.IsDir()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) ModTime() time.Time {
|
|
||||||
return time.Time{}
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) Mode() fs.FileMode {
|
|
||||||
return fi.mode
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) Name() string {
|
|
||||||
return fi.name
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) Size() int64 {
|
|
||||||
return fi.size
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) Sys() any {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) Info() (fs.FileInfo, error) {
|
|
||||||
return fi, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func (fi *fileInfo) Type() fs.FileMode {
|
|
||||||
return fi.mode.Type()
|
|
||||||
}
|
|
||||||
@ -1,420 +0,0 @@
|
|||||||
//go:build !noembed
|
|
||||||
|
|
||||||
// Code generated by generate.go; DO NOT EDIT.
|
|
||||||
|
|
||||||
package bundled
|
|
||||||
|
|
||||||
import (
|
|
||||||
"io/fs"
|
|
||||||
|
|
||||||
_ "embed"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
//go:embed libs/lib.d.ts
|
|
||||||
libs_lib_d_ts string
|
|
||||||
//go:embed libs/lib.decorators.d.ts
|
|
||||||
libs_lib_decorators_d_ts string
|
|
||||||
//go:embed libs/lib.decorators.legacy.d.ts
|
|
||||||
libs_lib_decorators_legacy_d_ts string
|
|
||||||
//go:embed libs/lib.dom.asynciterable.d.ts
|
|
||||||
libs_lib_dom_asynciterable_d_ts string
|
|
||||||
//go:embed libs/lib.dom.d.ts
|
|
||||||
libs_lib_dom_d_ts string
|
|
||||||
//go:embed libs/lib.dom.iterable.d.ts
|
|
||||||
libs_lib_dom_iterable_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.collection.d.ts
|
|
||||||
libs_lib_es2015_collection_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.core.d.ts
|
|
||||||
libs_lib_es2015_core_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.d.ts
|
|
||||||
libs_lib_es2015_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.generator.d.ts
|
|
||||||
libs_lib_es2015_generator_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.iterable.d.ts
|
|
||||||
libs_lib_es2015_iterable_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.promise.d.ts
|
|
||||||
libs_lib_es2015_promise_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.proxy.d.ts
|
|
||||||
libs_lib_es2015_proxy_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.reflect.d.ts
|
|
||||||
libs_lib_es2015_reflect_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.symbol.d.ts
|
|
||||||
libs_lib_es2015_symbol_d_ts string
|
|
||||||
//go:embed libs/lib.es2015.symbol.wellknown.d.ts
|
|
||||||
libs_lib_es2015_symbol_wellknown_d_ts string
|
|
||||||
//go:embed libs/lib.es2016.array.include.d.ts
|
|
||||||
libs_lib_es2016_array_include_d_ts string
|
|
||||||
//go:embed libs/lib.es2016.d.ts
|
|
||||||
libs_lib_es2016_d_ts string
|
|
||||||
//go:embed libs/lib.es2016.full.d.ts
|
|
||||||
libs_lib_es2016_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2016.intl.d.ts
|
|
||||||
libs_lib_es2016_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.arraybuffer.d.ts
|
|
||||||
libs_lib_es2017_arraybuffer_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.d.ts
|
|
||||||
libs_lib_es2017_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.date.d.ts
|
|
||||||
libs_lib_es2017_date_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.full.d.ts
|
|
||||||
libs_lib_es2017_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.intl.d.ts
|
|
||||||
libs_lib_es2017_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.object.d.ts
|
|
||||||
libs_lib_es2017_object_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.sharedmemory.d.ts
|
|
||||||
libs_lib_es2017_sharedmemory_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.string.d.ts
|
|
||||||
libs_lib_es2017_string_d_ts string
|
|
||||||
//go:embed libs/lib.es2017.typedarrays.d.ts
|
|
||||||
libs_lib_es2017_typedarrays_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.asyncgenerator.d.ts
|
|
||||||
libs_lib_es2018_asyncgenerator_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.asynciterable.d.ts
|
|
||||||
libs_lib_es2018_asynciterable_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.d.ts
|
|
||||||
libs_lib_es2018_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.full.d.ts
|
|
||||||
libs_lib_es2018_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.intl.d.ts
|
|
||||||
libs_lib_es2018_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.promise.d.ts
|
|
||||||
libs_lib_es2018_promise_d_ts string
|
|
||||||
//go:embed libs/lib.es2018.regexp.d.ts
|
|
||||||
libs_lib_es2018_regexp_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.array.d.ts
|
|
||||||
libs_lib_es2019_array_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.d.ts
|
|
||||||
libs_lib_es2019_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.full.d.ts
|
|
||||||
libs_lib_es2019_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.intl.d.ts
|
|
||||||
libs_lib_es2019_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.object.d.ts
|
|
||||||
libs_lib_es2019_object_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.string.d.ts
|
|
||||||
libs_lib_es2019_string_d_ts string
|
|
||||||
//go:embed libs/lib.es2019.symbol.d.ts
|
|
||||||
libs_lib_es2019_symbol_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.bigint.d.ts
|
|
||||||
libs_lib_es2020_bigint_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.d.ts
|
|
||||||
libs_lib_es2020_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.date.d.ts
|
|
||||||
libs_lib_es2020_date_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.full.d.ts
|
|
||||||
libs_lib_es2020_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.intl.d.ts
|
|
||||||
libs_lib_es2020_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.number.d.ts
|
|
||||||
libs_lib_es2020_number_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.promise.d.ts
|
|
||||||
libs_lib_es2020_promise_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.sharedmemory.d.ts
|
|
||||||
libs_lib_es2020_sharedmemory_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.string.d.ts
|
|
||||||
libs_lib_es2020_string_d_ts string
|
|
||||||
//go:embed libs/lib.es2020.symbol.wellknown.d.ts
|
|
||||||
libs_lib_es2020_symbol_wellknown_d_ts string
|
|
||||||
//go:embed libs/lib.es2021.d.ts
|
|
||||||
libs_lib_es2021_d_ts string
|
|
||||||
//go:embed libs/lib.es2021.full.d.ts
|
|
||||||
libs_lib_es2021_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2021.intl.d.ts
|
|
||||||
libs_lib_es2021_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2021.promise.d.ts
|
|
||||||
libs_lib_es2021_promise_d_ts string
|
|
||||||
//go:embed libs/lib.es2021.string.d.ts
|
|
||||||
libs_lib_es2021_string_d_ts string
|
|
||||||
//go:embed libs/lib.es2021.weakref.d.ts
|
|
||||||
libs_lib_es2021_weakref_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.array.d.ts
|
|
||||||
libs_lib_es2022_array_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.d.ts
|
|
||||||
libs_lib_es2022_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.error.d.ts
|
|
||||||
libs_lib_es2022_error_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.full.d.ts
|
|
||||||
libs_lib_es2022_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.intl.d.ts
|
|
||||||
libs_lib_es2022_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.object.d.ts
|
|
||||||
libs_lib_es2022_object_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.regexp.d.ts
|
|
||||||
libs_lib_es2022_regexp_d_ts string
|
|
||||||
//go:embed libs/lib.es2022.string.d.ts
|
|
||||||
libs_lib_es2022_string_d_ts string
|
|
||||||
//go:embed libs/lib.es2023.array.d.ts
|
|
||||||
libs_lib_es2023_array_d_ts string
|
|
||||||
//go:embed libs/lib.es2023.collection.d.ts
|
|
||||||
libs_lib_es2023_collection_d_ts string
|
|
||||||
//go:embed libs/lib.es2023.d.ts
|
|
||||||
libs_lib_es2023_d_ts string
|
|
||||||
//go:embed libs/lib.es2023.full.d.ts
|
|
||||||
libs_lib_es2023_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2023.intl.d.ts
|
|
||||||
libs_lib_es2023_intl_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.arraybuffer.d.ts
|
|
||||||
libs_lib_es2024_arraybuffer_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.collection.d.ts
|
|
||||||
libs_lib_es2024_collection_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.d.ts
|
|
||||||
libs_lib_es2024_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.full.d.ts
|
|
||||||
libs_lib_es2024_full_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.object.d.ts
|
|
||||||
libs_lib_es2024_object_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.promise.d.ts
|
|
||||||
libs_lib_es2024_promise_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.regexp.d.ts
|
|
||||||
libs_lib_es2024_regexp_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.sharedmemory.d.ts
|
|
||||||
libs_lib_es2024_sharedmemory_d_ts string
|
|
||||||
//go:embed libs/lib.es2024.string.d.ts
|
|
||||||
libs_lib_es2024_string_d_ts string
|
|
||||||
//go:embed libs/lib.es5.d.ts
|
|
||||||
libs_lib_es5_d_ts string
|
|
||||||
//go:embed libs/lib.es6.d.ts
|
|
||||||
libs_lib_es6_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.array.d.ts
|
|
||||||
libs_lib_esnext_array_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.collection.d.ts
|
|
||||||
libs_lib_esnext_collection_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.d.ts
|
|
||||||
libs_lib_esnext_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.decorators.d.ts
|
|
||||||
libs_lib_esnext_decorators_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.disposable.d.ts
|
|
||||||
libs_lib_esnext_disposable_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.error.d.ts
|
|
||||||
libs_lib_esnext_error_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.float16.d.ts
|
|
||||||
libs_lib_esnext_float16_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.full.d.ts
|
|
||||||
libs_lib_esnext_full_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.intl.d.ts
|
|
||||||
libs_lib_esnext_intl_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.iterator.d.ts
|
|
||||||
libs_lib_esnext_iterator_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.promise.d.ts
|
|
||||||
libs_lib_esnext_promise_d_ts string
|
|
||||||
//go:embed libs/lib.esnext.sharedmemory.d.ts
|
|
||||||
libs_lib_esnext_sharedmemory_d_ts string
|
|
||||||
//go:embed libs/lib.scripthost.d.ts
|
|
||||||
libs_lib_scripthost_d_ts string
|
|
||||||
//go:embed libs/lib.webworker.asynciterable.d.ts
|
|
||||||
libs_lib_webworker_asynciterable_d_ts string
|
|
||||||
//go:embed libs/lib.webworker.d.ts
|
|
||||||
libs_lib_webworker_d_ts string
|
|
||||||
//go:embed libs/lib.webworker.importscripts.d.ts
|
|
||||||
libs_lib_webworker_importscripts_d_ts string
|
|
||||||
//go:embed libs/lib.webworker.iterable.d.ts
|
|
||||||
libs_lib_webworker_iterable_d_ts string
|
|
||||||
)
|
|
||||||
|
|
||||||
var embeddedContents = map[string]string{
|
|
||||||
"libs/lib.d.ts": libs_lib_d_ts,
|
|
||||||
"libs/lib.decorators.d.ts": libs_lib_decorators_d_ts,
|
|
||||||
"libs/lib.decorators.legacy.d.ts": libs_lib_decorators_legacy_d_ts,
|
|
||||||
"libs/lib.dom.asynciterable.d.ts": libs_lib_dom_asynciterable_d_ts,
|
|
||||||
"libs/lib.dom.d.ts": libs_lib_dom_d_ts,
|
|
||||||
"libs/lib.dom.iterable.d.ts": libs_lib_dom_iterable_d_ts,
|
|
||||||
"libs/lib.es2015.collection.d.ts": libs_lib_es2015_collection_d_ts,
|
|
||||||
"libs/lib.es2015.core.d.ts": libs_lib_es2015_core_d_ts,
|
|
||||||
"libs/lib.es2015.d.ts": libs_lib_es2015_d_ts,
|
|
||||||
"libs/lib.es2015.generator.d.ts": libs_lib_es2015_generator_d_ts,
|
|
||||||
"libs/lib.es2015.iterable.d.ts": libs_lib_es2015_iterable_d_ts,
|
|
||||||
"libs/lib.es2015.promise.d.ts": libs_lib_es2015_promise_d_ts,
|
|
||||||
"libs/lib.es2015.proxy.d.ts": libs_lib_es2015_proxy_d_ts,
|
|
||||||
"libs/lib.es2015.reflect.d.ts": libs_lib_es2015_reflect_d_ts,
|
|
||||||
"libs/lib.es2015.symbol.d.ts": libs_lib_es2015_symbol_d_ts,
|
|
||||||
"libs/lib.es2015.symbol.wellknown.d.ts": libs_lib_es2015_symbol_wellknown_d_ts,
|
|
||||||
"libs/lib.es2016.array.include.d.ts": libs_lib_es2016_array_include_d_ts,
|
|
||||||
"libs/lib.es2016.d.ts": libs_lib_es2016_d_ts,
|
|
||||||
"libs/lib.es2016.full.d.ts": libs_lib_es2016_full_d_ts,
|
|
||||||
"libs/lib.es2016.intl.d.ts": libs_lib_es2016_intl_d_ts,
|
|
||||||
"libs/lib.es2017.arraybuffer.d.ts": libs_lib_es2017_arraybuffer_d_ts,
|
|
||||||
"libs/lib.es2017.d.ts": libs_lib_es2017_d_ts,
|
|
||||||
"libs/lib.es2017.date.d.ts": libs_lib_es2017_date_d_ts,
|
|
||||||
"libs/lib.es2017.full.d.ts": libs_lib_es2017_full_d_ts,
|
|
||||||
"libs/lib.es2017.intl.d.ts": libs_lib_es2017_intl_d_ts,
|
|
||||||
"libs/lib.es2017.object.d.ts": libs_lib_es2017_object_d_ts,
|
|
||||||
"libs/lib.es2017.sharedmemory.d.ts": libs_lib_es2017_sharedmemory_d_ts,
|
|
||||||
"libs/lib.es2017.string.d.ts": libs_lib_es2017_string_d_ts,
|
|
||||||
"libs/lib.es2017.typedarrays.d.ts": libs_lib_es2017_typedarrays_d_ts,
|
|
||||||
"libs/lib.es2018.asyncgenerator.d.ts": libs_lib_es2018_asyncgenerator_d_ts,
|
|
||||||
"libs/lib.es2018.asynciterable.d.ts": libs_lib_es2018_asynciterable_d_ts,
|
|
||||||
"libs/lib.es2018.d.ts": libs_lib_es2018_d_ts,
|
|
||||||
"libs/lib.es2018.full.d.ts": libs_lib_es2018_full_d_ts,
|
|
||||||
"libs/lib.es2018.intl.d.ts": libs_lib_es2018_intl_d_ts,
|
|
||||||
"libs/lib.es2018.promise.d.ts": libs_lib_es2018_promise_d_ts,
|
|
||||||
"libs/lib.es2018.regexp.d.ts": libs_lib_es2018_regexp_d_ts,
|
|
||||||
"libs/lib.es2019.array.d.ts": libs_lib_es2019_array_d_ts,
|
|
||||||
"libs/lib.es2019.d.ts": libs_lib_es2019_d_ts,
|
|
||||||
"libs/lib.es2019.full.d.ts": libs_lib_es2019_full_d_ts,
|
|
||||||
"libs/lib.es2019.intl.d.ts": libs_lib_es2019_intl_d_ts,
|
|
||||||
"libs/lib.es2019.object.d.ts": libs_lib_es2019_object_d_ts,
|
|
||||||
"libs/lib.es2019.string.d.ts": libs_lib_es2019_string_d_ts,
|
|
||||||
"libs/lib.es2019.symbol.d.ts": libs_lib_es2019_symbol_d_ts,
|
|
||||||
"libs/lib.es2020.bigint.d.ts": libs_lib_es2020_bigint_d_ts,
|
|
||||||
"libs/lib.es2020.d.ts": libs_lib_es2020_d_ts,
|
|
||||||
"libs/lib.es2020.date.d.ts": libs_lib_es2020_date_d_ts,
|
|
||||||
"libs/lib.es2020.full.d.ts": libs_lib_es2020_full_d_ts,
|
|
||||||
"libs/lib.es2020.intl.d.ts": libs_lib_es2020_intl_d_ts,
|
|
||||||
"libs/lib.es2020.number.d.ts": libs_lib_es2020_number_d_ts,
|
|
||||||
"libs/lib.es2020.promise.d.ts": libs_lib_es2020_promise_d_ts,
|
|
||||||
"libs/lib.es2020.sharedmemory.d.ts": libs_lib_es2020_sharedmemory_d_ts,
|
|
||||||
"libs/lib.es2020.string.d.ts": libs_lib_es2020_string_d_ts,
|
|
||||||
"libs/lib.es2020.symbol.wellknown.d.ts": libs_lib_es2020_symbol_wellknown_d_ts,
|
|
||||||
"libs/lib.es2021.d.ts": libs_lib_es2021_d_ts,
|
|
||||||
"libs/lib.es2021.full.d.ts": libs_lib_es2021_full_d_ts,
|
|
||||||
"libs/lib.es2021.intl.d.ts": libs_lib_es2021_intl_d_ts,
|
|
||||||
"libs/lib.es2021.promise.d.ts": libs_lib_es2021_promise_d_ts,
|
|
||||||
"libs/lib.es2021.string.d.ts": libs_lib_es2021_string_d_ts,
|
|
||||||
"libs/lib.es2021.weakref.d.ts": libs_lib_es2021_weakref_d_ts,
|
|
||||||
"libs/lib.es2022.array.d.ts": libs_lib_es2022_array_d_ts,
|
|
||||||
"libs/lib.es2022.d.ts": libs_lib_es2022_d_ts,
|
|
||||||
"libs/lib.es2022.error.d.ts": libs_lib_es2022_error_d_ts,
|
|
||||||
"libs/lib.es2022.full.d.ts": libs_lib_es2022_full_d_ts,
|
|
||||||
"libs/lib.es2022.intl.d.ts": libs_lib_es2022_intl_d_ts,
|
|
||||||
"libs/lib.es2022.object.d.ts": libs_lib_es2022_object_d_ts,
|
|
||||||
"libs/lib.es2022.regexp.d.ts": libs_lib_es2022_regexp_d_ts,
|
|
||||||
"libs/lib.es2022.string.d.ts": libs_lib_es2022_string_d_ts,
|
|
||||||
"libs/lib.es2023.array.d.ts": libs_lib_es2023_array_d_ts,
|
|
||||||
"libs/lib.es2023.collection.d.ts": libs_lib_es2023_collection_d_ts,
|
|
||||||
"libs/lib.es2023.d.ts": libs_lib_es2023_d_ts,
|
|
||||||
"libs/lib.es2023.full.d.ts": libs_lib_es2023_full_d_ts,
|
|
||||||
"libs/lib.es2023.intl.d.ts": libs_lib_es2023_intl_d_ts,
|
|
||||||
"libs/lib.es2024.arraybuffer.d.ts": libs_lib_es2024_arraybuffer_d_ts,
|
|
||||||
"libs/lib.es2024.collection.d.ts": libs_lib_es2024_collection_d_ts,
|
|
||||||
"libs/lib.es2024.d.ts": libs_lib_es2024_d_ts,
|
|
||||||
"libs/lib.es2024.full.d.ts": libs_lib_es2024_full_d_ts,
|
|
||||||
"libs/lib.es2024.object.d.ts": libs_lib_es2024_object_d_ts,
|
|
||||||
"libs/lib.es2024.promise.d.ts": libs_lib_es2024_promise_d_ts,
|
|
||||||
"libs/lib.es2024.regexp.d.ts": libs_lib_es2024_regexp_d_ts,
|
|
||||||
"libs/lib.es2024.sharedmemory.d.ts": libs_lib_es2024_sharedmemory_d_ts,
|
|
||||||
"libs/lib.es2024.string.d.ts": libs_lib_es2024_string_d_ts,
|
|
||||||
"libs/lib.es5.d.ts": libs_lib_es5_d_ts,
|
|
||||||
"libs/lib.es6.d.ts": libs_lib_es6_d_ts,
|
|
||||||
"libs/lib.esnext.array.d.ts": libs_lib_esnext_array_d_ts,
|
|
||||||
"libs/lib.esnext.collection.d.ts": libs_lib_esnext_collection_d_ts,
|
|
||||||
"libs/lib.esnext.d.ts": libs_lib_esnext_d_ts,
|
|
||||||
"libs/lib.esnext.decorators.d.ts": libs_lib_esnext_decorators_d_ts,
|
|
||||||
"libs/lib.esnext.disposable.d.ts": libs_lib_esnext_disposable_d_ts,
|
|
||||||
"libs/lib.esnext.error.d.ts": libs_lib_esnext_error_d_ts,
|
|
||||||
"libs/lib.esnext.float16.d.ts": libs_lib_esnext_float16_d_ts,
|
|
||||||
"libs/lib.esnext.full.d.ts": libs_lib_esnext_full_d_ts,
|
|
||||||
"libs/lib.esnext.intl.d.ts": libs_lib_esnext_intl_d_ts,
|
|
||||||
"libs/lib.esnext.iterator.d.ts": libs_lib_esnext_iterator_d_ts,
|
|
||||||
"libs/lib.esnext.promise.d.ts": libs_lib_esnext_promise_d_ts,
|
|
||||||
"libs/lib.esnext.sharedmemory.d.ts": libs_lib_esnext_sharedmemory_d_ts,
|
|
||||||
"libs/lib.scripthost.d.ts": libs_lib_scripthost_d_ts,
|
|
||||||
"libs/lib.webworker.asynciterable.d.ts": libs_lib_webworker_asynciterable_d_ts,
|
|
||||||
"libs/lib.webworker.d.ts": libs_lib_webworker_d_ts,
|
|
||||||
"libs/lib.webworker.importscripts.d.ts": libs_lib_webworker_importscripts_d_ts,
|
|
||||||
"libs/lib.webworker.iterable.d.ts": libs_lib_webworker_iterable_d_ts,
|
|
||||||
}
|
|
||||||
|
|
||||||
var libsEntries = []fs.DirEntry{
|
|
||||||
&fileInfo{name: "lib.d.ts", size: int64(len(libs_lib_d_ts))},
|
|
||||||
&fileInfo{name: "lib.decorators.d.ts", size: int64(len(libs_lib_decorators_d_ts))},
|
|
||||||
&fileInfo{name: "lib.decorators.legacy.d.ts", size: int64(len(libs_lib_decorators_legacy_d_ts))},
|
|
||||||
&fileInfo{name: "lib.dom.asynciterable.d.ts", size: int64(len(libs_lib_dom_asynciterable_d_ts))},
|
|
||||||
&fileInfo{name: "lib.dom.d.ts", size: int64(len(libs_lib_dom_d_ts))},
|
|
||||||
&fileInfo{name: "lib.dom.iterable.d.ts", size: int64(len(libs_lib_dom_iterable_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.collection.d.ts", size: int64(len(libs_lib_es2015_collection_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.core.d.ts", size: int64(len(libs_lib_es2015_core_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.d.ts", size: int64(len(libs_lib_es2015_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.generator.d.ts", size: int64(len(libs_lib_es2015_generator_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.iterable.d.ts", size: int64(len(libs_lib_es2015_iterable_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.promise.d.ts", size: int64(len(libs_lib_es2015_promise_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.proxy.d.ts", size: int64(len(libs_lib_es2015_proxy_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.reflect.d.ts", size: int64(len(libs_lib_es2015_reflect_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.symbol.d.ts", size: int64(len(libs_lib_es2015_symbol_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2015.symbol.wellknown.d.ts", size: int64(len(libs_lib_es2015_symbol_wellknown_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2016.array.include.d.ts", size: int64(len(libs_lib_es2016_array_include_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2016.d.ts", size: int64(len(libs_lib_es2016_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2016.full.d.ts", size: int64(len(libs_lib_es2016_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2016.intl.d.ts", size: int64(len(libs_lib_es2016_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.arraybuffer.d.ts", size: int64(len(libs_lib_es2017_arraybuffer_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.d.ts", size: int64(len(libs_lib_es2017_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.date.d.ts", size: int64(len(libs_lib_es2017_date_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.full.d.ts", size: int64(len(libs_lib_es2017_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.intl.d.ts", size: int64(len(libs_lib_es2017_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.object.d.ts", size: int64(len(libs_lib_es2017_object_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.sharedmemory.d.ts", size: int64(len(libs_lib_es2017_sharedmemory_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.string.d.ts", size: int64(len(libs_lib_es2017_string_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2017.typedarrays.d.ts", size: int64(len(libs_lib_es2017_typedarrays_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.asyncgenerator.d.ts", size: int64(len(libs_lib_es2018_asyncgenerator_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.asynciterable.d.ts", size: int64(len(libs_lib_es2018_asynciterable_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.d.ts", size: int64(len(libs_lib_es2018_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.full.d.ts", size: int64(len(libs_lib_es2018_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.intl.d.ts", size: int64(len(libs_lib_es2018_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.promise.d.ts", size: int64(len(libs_lib_es2018_promise_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2018.regexp.d.ts", size: int64(len(libs_lib_es2018_regexp_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.array.d.ts", size: int64(len(libs_lib_es2019_array_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.d.ts", size: int64(len(libs_lib_es2019_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.full.d.ts", size: int64(len(libs_lib_es2019_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.intl.d.ts", size: int64(len(libs_lib_es2019_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.object.d.ts", size: int64(len(libs_lib_es2019_object_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.string.d.ts", size: int64(len(libs_lib_es2019_string_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2019.symbol.d.ts", size: int64(len(libs_lib_es2019_symbol_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.bigint.d.ts", size: int64(len(libs_lib_es2020_bigint_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.d.ts", size: int64(len(libs_lib_es2020_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.date.d.ts", size: int64(len(libs_lib_es2020_date_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.full.d.ts", size: int64(len(libs_lib_es2020_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.intl.d.ts", size: int64(len(libs_lib_es2020_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.number.d.ts", size: int64(len(libs_lib_es2020_number_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.promise.d.ts", size: int64(len(libs_lib_es2020_promise_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.sharedmemory.d.ts", size: int64(len(libs_lib_es2020_sharedmemory_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.string.d.ts", size: int64(len(libs_lib_es2020_string_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2020.symbol.wellknown.d.ts", size: int64(len(libs_lib_es2020_symbol_wellknown_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2021.d.ts", size: int64(len(libs_lib_es2021_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2021.full.d.ts", size: int64(len(libs_lib_es2021_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2021.intl.d.ts", size: int64(len(libs_lib_es2021_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2021.promise.d.ts", size: int64(len(libs_lib_es2021_promise_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2021.string.d.ts", size: int64(len(libs_lib_es2021_string_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2021.weakref.d.ts", size: int64(len(libs_lib_es2021_weakref_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.array.d.ts", size: int64(len(libs_lib_es2022_array_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.d.ts", size: int64(len(libs_lib_es2022_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.error.d.ts", size: int64(len(libs_lib_es2022_error_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.full.d.ts", size: int64(len(libs_lib_es2022_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.intl.d.ts", size: int64(len(libs_lib_es2022_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.object.d.ts", size: int64(len(libs_lib_es2022_object_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.regexp.d.ts", size: int64(len(libs_lib_es2022_regexp_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2022.string.d.ts", size: int64(len(libs_lib_es2022_string_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2023.array.d.ts", size: int64(len(libs_lib_es2023_array_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2023.collection.d.ts", size: int64(len(libs_lib_es2023_collection_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2023.d.ts", size: int64(len(libs_lib_es2023_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2023.full.d.ts", size: int64(len(libs_lib_es2023_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2023.intl.d.ts", size: int64(len(libs_lib_es2023_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.arraybuffer.d.ts", size: int64(len(libs_lib_es2024_arraybuffer_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.collection.d.ts", size: int64(len(libs_lib_es2024_collection_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.d.ts", size: int64(len(libs_lib_es2024_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.full.d.ts", size: int64(len(libs_lib_es2024_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.object.d.ts", size: int64(len(libs_lib_es2024_object_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.promise.d.ts", size: int64(len(libs_lib_es2024_promise_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.regexp.d.ts", size: int64(len(libs_lib_es2024_regexp_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.sharedmemory.d.ts", size: int64(len(libs_lib_es2024_sharedmemory_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es2024.string.d.ts", size: int64(len(libs_lib_es2024_string_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es5.d.ts", size: int64(len(libs_lib_es5_d_ts))},
|
|
||||||
&fileInfo{name: "lib.es6.d.ts", size: int64(len(libs_lib_es6_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.array.d.ts", size: int64(len(libs_lib_esnext_array_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.collection.d.ts", size: int64(len(libs_lib_esnext_collection_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.d.ts", size: int64(len(libs_lib_esnext_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.decorators.d.ts", size: int64(len(libs_lib_esnext_decorators_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.disposable.d.ts", size: int64(len(libs_lib_esnext_disposable_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.error.d.ts", size: int64(len(libs_lib_esnext_error_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.float16.d.ts", size: int64(len(libs_lib_esnext_float16_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.full.d.ts", size: int64(len(libs_lib_esnext_full_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.intl.d.ts", size: int64(len(libs_lib_esnext_intl_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.iterator.d.ts", size: int64(len(libs_lib_esnext_iterator_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.promise.d.ts", size: int64(len(libs_lib_esnext_promise_d_ts))},
|
|
||||||
&fileInfo{name: "lib.esnext.sharedmemory.d.ts", size: int64(len(libs_lib_esnext_sharedmemory_d_ts))},
|
|
||||||
&fileInfo{name: "lib.scripthost.d.ts", size: int64(len(libs_lib_scripthost_d_ts))},
|
|
||||||
&fileInfo{name: "lib.webworker.asynciterable.d.ts", size: int64(len(libs_lib_webworker_asynciterable_d_ts))},
|
|
||||||
&fileInfo{name: "lib.webworker.d.ts", size: int64(len(libs_lib_webworker_d_ts))},
|
|
||||||
&fileInfo{name: "lib.webworker.importscripts.d.ts", size: int64(len(libs_lib_webworker_importscripts_d_ts))},
|
|
||||||
&fileInfo{name: "lib.webworker.iterable.d.ts", size: int64(len(libs_lib_webworker_iterable_d_ts))},
|
|
||||||
}
|
|
||||||
@ -1,228 +0,0 @@
|
|||||||
//go:build ignore
|
|
||||||
|
|
||||||
package main
|
|
||||||
|
|
||||||
import (
|
|
||||||
"bytes"
|
|
||||||
"fmt"
|
|
||||||
"go/format"
|
|
||||||
"log"
|
|
||||||
"os"
|
|
||||||
"path/filepath"
|
|
||||||
"slices"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/ast"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/core"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/parser"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/repo"
|
|
||||||
"efprojects.com/kitten-ipc/kitcom/internal/tsgo/tspath"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
libInputDir = filepath.Join(repo.TypeScriptSubmodulePath, "src", "lib")
|
|
||||||
copyrightNotice = filepath.Join(repo.TypeScriptSubmodulePath, "scripts", "CopyrightNotice.txt")
|
|
||||||
)
|
|
||||||
|
|
||||||
func main() {
|
|
||||||
log.SetFlags(log.LstdFlags | log.Lshortfile)
|
|
||||||
|
|
||||||
libs := readLibs()
|
|
||||||
generateLibs(libs)
|
|
||||||
generateLibList(libs)
|
|
||||||
generateEmbedded(libs)
|
|
||||||
}
|
|
||||||
|
|
||||||
type lib struct {
|
|
||||||
target string // target relative to libs dir
|
|
||||||
sources []string // sources relative to src/lib dir
|
|
||||||
}
|
|
||||||
|
|
||||||
func generateLibs(libs []lib) {
|
|
||||||
const outputDir = "libs"
|
|
||||||
|
|
||||||
copyright := readCopyright()
|
|
||||||
|
|
||||||
if err := os.RemoveAll(outputDir); err != nil {
|
|
||||||
log.Fatalf("failed to remove libs directory: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := os.MkdirAll(outputDir, 0o755); err != nil {
|
|
||||||
log.Fatalf("failed to create libs directory: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, lib := range libs {
|
|
||||||
var output bytes.Buffer
|
|
||||||
output.Write(copyright)
|
|
||||||
|
|
||||||
for _, source := range lib.sources {
|
|
||||||
sourcePath := filepath.Join(libInputDir, source)
|
|
||||||
b, err := os.ReadFile(sourcePath)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to read %s: %v", sourcePath, err)
|
|
||||||
}
|
|
||||||
|
|
||||||
output.WriteByte('\n')
|
|
||||||
output.Write(removeCRLF(b))
|
|
||||||
}
|
|
||||||
|
|
||||||
outputPath := filepath.Join(outputDir, lib.target)
|
|
||||||
if err := os.WriteFile(outputPath, output.Bytes(), 0o644); err != nil {
|
|
||||||
log.Fatalf("failed to write %s: %v", outputPath, err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func generateLibList(libs []lib) {
|
|
||||||
var code bytes.Buffer
|
|
||||||
code.WriteString("// Code generated by generate.go; DO NOT EDIT.\n\n")
|
|
||||||
code.WriteString("package bundled\n\n")
|
|
||||||
|
|
||||||
code.WriteString("// LibNames is the list of all bundled lib files, sorted by name.\n")
|
|
||||||
code.WriteString("// For the list of libs sorted by load order, use [tsoptions.Libs].\n")
|
|
||||||
code.WriteString("var LibNames = []string{\n")
|
|
||||||
for _, lib := range libs {
|
|
||||||
code.WriteString("\t\"" + lib.target + "\",\n")
|
|
||||||
}
|
|
||||||
code.WriteString("}\n")
|
|
||||||
|
|
||||||
writeCode("libs_generated.go", code.Bytes())
|
|
||||||
}
|
|
||||||
|
|
||||||
func generateEmbedded(libs []lib) {
|
|
||||||
libVarNames := make([]string, len(libs))
|
|
||||||
for i, lib := range libs {
|
|
||||||
libVarNames[i] = "libs_" + strings.ReplaceAll(lib.target, ".", "_")
|
|
||||||
}
|
|
||||||
|
|
||||||
var code bytes.Buffer
|
|
||||||
code.WriteString("//go:build !noembed\n\n")
|
|
||||||
code.WriteString("// Code generated by generate.go; DO NOT EDIT.\n\n")
|
|
||||||
code.WriteString("package bundled\n\n")
|
|
||||||
code.WriteString("import (\n")
|
|
||||||
code.WriteString("\"io/fs\"\n\n")
|
|
||||||
code.WriteString("_ \"embed\"\n")
|
|
||||||
code.WriteString(")\n\n")
|
|
||||||
|
|
||||||
code.WriteString("var (\n")
|
|
||||||
for i, lib := range libs {
|
|
||||||
varName := libVarNames[i]
|
|
||||||
code.WriteString("//go:embed libs/" + lib.target + "\n")
|
|
||||||
code.WriteString("" + varName + " string\n")
|
|
||||||
}
|
|
||||||
code.WriteString(")\n\n")
|
|
||||||
|
|
||||||
code.WriteString("var embeddedContents = map[string]string{\n")
|
|
||||||
for i, lib := range libs {
|
|
||||||
varName := libVarNames[i]
|
|
||||||
code.WriteString("\t\"libs/" + lib.target + "\": " + varName + ",\n")
|
|
||||||
}
|
|
||||||
code.WriteString("}\n\n")
|
|
||||||
|
|
||||||
code.WriteString("var libsEntries = []fs.DirEntry{\n")
|
|
||||||
for i, lib := range libs {
|
|
||||||
varName := libVarNames[i]
|
|
||||||
fmt.Fprintf(&code, "\t&fileInfo{name: %q, size: int64(len(%s))},\n", lib.target, varName)
|
|
||||||
}
|
|
||||||
code.WriteString("}\n")
|
|
||||||
|
|
||||||
writeCode("embed_generated.go", code.Bytes())
|
|
||||||
}
|
|
||||||
|
|
||||||
func readLibs() []lib {
|
|
||||||
type libsMeta struct {
|
|
||||||
libs []string
|
|
||||||
paths map[string]string
|
|
||||||
}
|
|
||||||
|
|
||||||
libsFile := tspath.NormalizeSlashes(filepath.Join(libInputDir, "libs.json"))
|
|
||||||
|
|
||||||
b, err := os.ReadFile(libsFile)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to open libs.json: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
sourceFile := parser.ParseSourceFile(ast.SourceFileParseOptions{
|
|
||||||
FileName: libsFile,
|
|
||||||
Path: tspath.Path(libsFile),
|
|
||||||
}, string(b), core.ScriptKindJSON)
|
|
||||||
diags := sourceFile.Diagnostics()
|
|
||||||
|
|
||||||
if len(diags) > 0 {
|
|
||||||
for _, diag := range diags {
|
|
||||||
log.Printf("%s", diag.Message())
|
|
||||||
}
|
|
||||||
log.Fatalf("failed to parse libs.json")
|
|
||||||
}
|
|
||||||
|
|
||||||
paths := make(map[string]string)
|
|
||||||
var libNames []string
|
|
||||||
|
|
||||||
props := sourceFile.Statements.Nodes[0].
|
|
||||||
AsExpressionStatement().
|
|
||||||
Expression.
|
|
||||||
AsObjectLiteralExpression().
|
|
||||||
Properties.
|
|
||||||
Nodes
|
|
||||||
|
|
||||||
for _, prop := range props {
|
|
||||||
assign := prop.AsPropertyAssignment()
|
|
||||||
name := assign.Name().Text()
|
|
||||||
switch name {
|
|
||||||
case "libs":
|
|
||||||
for _, lib := range assign.Initializer.AsArrayLiteralExpression().Elements.Nodes {
|
|
||||||
libNames = append(libNames, lib.AsStringLiteral().Text)
|
|
||||||
}
|
|
||||||
case "paths":
|
|
||||||
for _, path := range assign.Initializer.AsObjectLiteralExpression().Properties.Nodes {
|
|
||||||
prop := path.AsPropertyAssignment()
|
|
||||||
key := prop.Name().Text()
|
|
||||||
value := prop.Initializer.AsStringLiteral().Text
|
|
||||||
paths[key] = value
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
log.Fatalf("unexpected property: %s", name)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var libs []lib
|
|
||||||
for _, libName := range libNames {
|
|
||||||
sources := []string{"header.d.ts", libName + ".d.ts"}
|
|
||||||
var target string
|
|
||||||
if path, ok := paths[libName]; ok {
|
|
||||||
target = path
|
|
||||||
} else {
|
|
||||||
target = "lib." + libName + ".d.ts"
|
|
||||||
}
|
|
||||||
libs = append(libs, lib{target: target, sources: sources})
|
|
||||||
}
|
|
||||||
|
|
||||||
slices.SortFunc(libs, func(a lib, b lib) int {
|
|
||||||
return strings.Compare(a.target, b.target)
|
|
||||||
})
|
|
||||||
|
|
||||||
return libs
|
|
||||||
}
|
|
||||||
|
|
||||||
func readCopyright() []byte {
|
|
||||||
b, err := os.ReadFile(copyrightNotice)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to read copyright notice: %v", err)
|
|
||||||
}
|
|
||||||
return removeCRLF(b)
|
|
||||||
}
|
|
||||||
|
|
||||||
func removeCRLF(b []byte) []byte {
|
|
||||||
return bytes.ReplaceAll(b, []byte("\r\n"), []byte("\n"))
|
|
||||||
}
|
|
||||||
|
|
||||||
func writeCode(filename string, code []byte) {
|
|
||||||
formatted, err := format.Source(code)
|
|
||||||
if err != nil {
|
|
||||||
log.Fatalf("failed to format source: %v", err)
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := os.WriteFile(filename, formatted, 0o644); err != nil {
|
|
||||||
log.Fatalf("failed to write %s: %v", filename, err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
22
kitcom/internal/tsgo/bundled/libs/lib.d.ts
vendored
22
kitcom/internal/tsgo/bundled/libs/lib.d.ts
vendored
@ -1,22 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,384 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
|
|
||||||
type DecoratorMetadataObject = Record<PropertyKey, unknown> & object;
|
|
||||||
|
|
||||||
type DecoratorMetadata = typeof globalThis extends { Symbol: { readonly metadata: symbol; }; } ? DecoratorMetadataObject : DecoratorMetadataObject | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 after static methods are defined but 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;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 after static methods are defined but 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;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 after static methods are defined but 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;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 immediately after the auto `accessor` being
|
|
||||||
* decorated is initialized (regardless if the `accessor` is `static` or not).
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 immediately after the field being decorated
|
|
||||||
* is initialized (regardless if the field is `static` or not).
|
|
||||||
*/
|
|
||||||
addInitializer(initializer: (this: This) => void): void;
|
|
||||||
|
|
||||||
readonly metadata: DecoratorMetadata;
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 | undefined, parameterIndex: number) => void;
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 Async Iterable APIs
|
|
||||||
/////////////////////////////
|
|
||||||
|
|
||||||
interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FileSystemDirectoryHandle {
|
|
||||||
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
|
|
||||||
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
|
|
||||||
keys(): FileSystemDirectoryHandleAsyncIterator<string>;
|
|
||||||
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadableStream<R = any> {
|
|
||||||
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
|
||||||
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
|
|
||||||
}
|
|
||||||
39429
kitcom/internal/tsgo/bundled/libs/lib.dom.d.ts
vendored
39429
kitcom/internal/tsgo/bundled/libs/lib.dom.d.ts
vendored
File diff suppressed because it is too large
Load Diff
@ -1,571 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* The **`setValueCurveAtTime()`** method of the following a curve defined by a list of values.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime)
|
|
||||||
*/
|
|
||||||
setValueCurveAtTime(values: Iterable<number>, startTime: number, duration: number): AudioParam;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AudioParamMap extends ReadonlyMap<string, AudioParam> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BaseAudioContext {
|
|
||||||
/**
|
|
||||||
* The **`createIIRFilter()`** method of the BaseAudioContext interface creates an IIRFilterNode, which represents a general **infinite impulse response** (IIR) filter which can be configured to serve as various types of filter.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter)
|
|
||||||
*/
|
|
||||||
createIIRFilter(feedforward: Iterable<number>, feedback: Iterable<number>): IIRFilterNode;
|
|
||||||
/**
|
|
||||||
* The `createPeriodicWave()` method of the BaseAudioContext interface is used to create a PeriodicWave.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave)
|
|
||||||
*/
|
|
||||||
createPeriodicWave(real: Iterable<number>, imag: Iterable<number>, constraints?: PeriodicWaveConstraints): PeriodicWave;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSKeyframesRule {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSKeyframeRule>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSNumericArray {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSNumericValue>;
|
|
||||||
entries(): ArrayIterator<[number, CSSNumericValue]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<CSSNumericValue>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSRuleList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSRule>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSStyleDeclaration {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSTransformValue {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSTransformComponent>;
|
|
||||||
entries(): ArrayIterator<[number, CSSTransformComponent]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<CSSTransformComponent>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CSSUnparsedValue {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSUnparsedSegment>;
|
|
||||||
entries(): ArrayIterator<[number, CSSUnparsedSegment]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<CSSUnparsedSegment>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Cache {
|
|
||||||
/**
|
|
||||||
* The **`addAll()`** method of the Cache interface takes an array of URLs, retrieves them, and adds the resulting response objects to the given cache.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Cache/addAll)
|
|
||||||
*/
|
|
||||||
addAll(requests: Iterable<RequestInfo>): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CanvasPath {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/roundRect) */
|
|
||||||
roundRect(x: number, y: number, w: number, h: number, radii?: number | DOMPointInit | Iterable<number | DOMPointInit>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CanvasPathDrawingStyles {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash) */
|
|
||||||
setLineDash(segments: Iterable<number>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CookieStoreManager {
|
|
||||||
/**
|
|
||||||
* The **`subscribe()`** method of the CookieStoreManager interface subscribes a ServiceWorkerRegistration to cookie change events.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/subscribe)
|
|
||||||
*/
|
|
||||||
subscribe(subscriptions: Iterable<CookieStoreGetOptions>): Promise<void>;
|
|
||||||
/**
|
|
||||||
* The **`unsubscribe()`** method of the CookieStoreManager interface stops the ServiceWorkerRegistration from receiving previously subscribed events.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CookieStoreManager/unsubscribe)
|
|
||||||
*/
|
|
||||||
unsubscribe(subscriptions: Iterable<CookieStoreGetOptions>): Promise<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CustomStateSet extends Set<string> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DOMRectList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<DOMRect>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DOMStringList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DOMTokenList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
entries(): ArrayIterator<[number, string]>;
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
values(): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DataTransferItemList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<DataTransferItem>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface EventCounts extends ReadonlyMap<string, number> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FileList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<File>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FontFaceSet extends Set<FontFace> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FormDataIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): FormDataIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FormData {
|
|
||||||
[Symbol.iterator](): FormDataIterator<[string, FormDataEntryValue]>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the list. */
|
|
||||||
entries(): FormDataIterator<[string, FormDataEntryValue]>;
|
|
||||||
/** Returns a list of keys in the list. */
|
|
||||||
keys(): FormDataIterator<string>;
|
|
||||||
/** Returns a list of values in the list. */
|
|
||||||
values(): FormDataIterator<FormDataEntryValue>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLAllCollection {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Element>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLCollectionBase {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Element>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLCollectionOf<T extends Element> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLFormElement {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Element>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HTMLSelectElement {
|
|
||||||
[Symbol.iterator](): ArrayIterator<HTMLOptionElement>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HeadersIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): HeadersIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Headers {
|
|
||||||
[Symbol.iterator](): HeadersIterator<[string, string]>;
|
|
||||||
/** Returns an iterator allowing to go through all key/value pairs contained in this object. */
|
|
||||||
entries(): HeadersIterator<[string, string]>;
|
|
||||||
/** Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. */
|
|
||||||
keys(): HeadersIterator<string>;
|
|
||||||
/** Returns an iterator allowing to go through all values of the key/value pairs contained in this object. */
|
|
||||||
values(): HeadersIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Highlight extends Set<AbstractRange> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface HighlightRegistry extends Map<string, Highlight> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IDBDatabase {
|
|
||||||
/**
|
|
||||||
* The **`transaction`** method of the IDBDatabase interface immediately returns a transaction object (IDBTransaction) containing the IDBTransaction.objectStore method, which you can use to access your object store.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBDatabase/transaction)
|
|
||||||
*/
|
|
||||||
transaction(storeNames: string | Iterable<string>, mode?: IDBTransactionMode, options?: IDBTransactionOptions): IDBTransaction;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IDBObjectStore {
|
|
||||||
/**
|
|
||||||
* The **`createIndex()`** method of the field/column defining a new data point for each database record to contain.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/createIndex)
|
|
||||||
*/
|
|
||||||
createIndex(name: string, keyPath: string | Iterable<string>, options?: IDBIndexParameters): IDBIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ImageTrackList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<ImageTrack>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MIDIInputMap extends ReadonlyMap<string, MIDIInput> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MIDIOutput {
|
|
||||||
/**
|
|
||||||
* The **`send()`** method of the MIDIOutput interface queues messages for the corresponding MIDI port.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send)
|
|
||||||
*/
|
|
||||||
send(data: Iterable<number>, timestamp?: DOMHighResTimeStamp): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MIDIOutputMap extends ReadonlyMap<string, MIDIOutput> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MediaKeyStatusMapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): MediaKeyStatusMapIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MediaKeyStatusMap {
|
|
||||||
[Symbol.iterator](): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
|
|
||||||
entries(): MediaKeyStatusMapIterator<[BufferSource, MediaKeyStatus]>;
|
|
||||||
keys(): MediaKeyStatusMapIterator<BufferSource>;
|
|
||||||
values(): MediaKeyStatusMapIterator<MediaKeyStatus>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MediaList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<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](): ArrayIterator<MimeType>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NamedNodeMap {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Attr>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Navigator {
|
|
||||||
/**
|
|
||||||
* The **`requestMediaKeySystemAccess()`** method of the Navigator interface returns a Promise which delivers a MediaKeySystemAccess object that can be used to access a particular media key system, which can in turn be used to create keys for decrypting a media stream.
|
|
||||||
* Available only in secure contexts.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/requestMediaKeySystemAccess)
|
|
||||||
*/
|
|
||||||
requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: Iterable<MediaKeySystemConfiguration>): Promise<MediaKeySystemAccess>;
|
|
||||||
/**
|
|
||||||
* The **`vibrate()`** method of the Navigator interface pulses the vibration hardware on the device, if such hardware exists.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Navigator/vibrate)
|
|
||||||
*/
|
|
||||||
vibrate(pattern: Iterable<number>): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NodeList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Node>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the list. */
|
|
||||||
entries(): ArrayIterator<[number, Node]>;
|
|
||||||
/** Returns an list of keys in the list. */
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
/** Returns an list of values in the list. */
|
|
||||||
values(): ArrayIterator<Node>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NodeListOf<TNode extends Node> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<TNode>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the list. */
|
|
||||||
entries(): ArrayIterator<[number, TNode]>;
|
|
||||||
/** Returns an list of keys in the list. */
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
/** Returns an list of values in the list. */
|
|
||||||
values(): ArrayIterator<TNode>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Plugin {
|
|
||||||
[Symbol.iterator](): ArrayIterator<MimeType>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PluginArray {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Plugin>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RTCRtpTransceiver {
|
|
||||||
/**
|
|
||||||
* The **`setCodecPreferences()`** method of the RTCRtpTransceiver interface is used to set the codecs that the transceiver allows for decoding _received_ data, in order of decreasing preference.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/RTCRtpTransceiver/setCodecPreferences)
|
|
||||||
*/
|
|
||||||
setCodecPreferences(codecs: Iterable<RTCRtpCodec>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RTCStatsReport extends ReadonlyMap<string, any> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGLengthList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SVGLength>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGNumberList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SVGNumber>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGPointList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<DOMPoint>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGStringList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SVGTransformList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SVGTransform>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SourceBufferList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SourceBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SpeechRecognitionResult {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SpeechRecognitionAlternative>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SpeechRecognitionResultList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<SpeechRecognitionResult>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StylePropertyMapReadOnlyIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): StylePropertyMapReadOnlyIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StylePropertyMapReadOnly {
|
|
||||||
[Symbol.iterator](): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue>]>;
|
|
||||||
entries(): StylePropertyMapReadOnlyIterator<[string, Iterable<CSSStyleValue>]>;
|
|
||||||
keys(): StylePropertyMapReadOnlyIterator<string>;
|
|
||||||
values(): StylePropertyMapReadOnlyIterator<Iterable<CSSStyleValue>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StyleSheetList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<CSSStyleSheet>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SubtleCrypto {
|
|
||||||
/**
|
|
||||||
* The **`deriveKey()`** method of the SubtleCrypto interface can be used to derive a secret key from a master key.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/deriveKey)
|
|
||||||
*/
|
|
||||||
deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AlgorithmIdentifier | AesDerivedKeyParams | HmacImportParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>;
|
|
||||||
/**
|
|
||||||
* The **`generateKey()`** method of the SubtleCrypto interface is used to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/generateKey)
|
|
||||||
*/
|
|
||||||
generateKey(algorithm: "Ed25519" | { name: "Ed25519" }, extractable: boolean, keyUsages: ReadonlyArray<"sign" | "verify">): Promise<CryptoKeyPair>;
|
|
||||||
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>;
|
|
||||||
/**
|
|
||||||
* The **`importKey()`** method of the SubtleCrypto interface imports a key: that is, it takes as input a key in an external, portable format and gives you a CryptoKey object that you can use in the Web Crypto API.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/importKey)
|
|
||||||
*/
|
|
||||||
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>;
|
|
||||||
/**
|
|
||||||
* The **`unwrapKey()`** method of the SubtleCrypto interface 'unwraps' a key.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/SubtleCrypto/unwrapKey)
|
|
||||||
*/
|
|
||||||
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](): ArrayIterator<TextTrackCue>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TextTrackList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<TextTrack>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TouchList {
|
|
||||||
[Symbol.iterator](): ArrayIterator<Touch>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface URLSearchParamsIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): URLSearchParamsIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface URLSearchParams {
|
|
||||||
[Symbol.iterator](): URLSearchParamsIterator<[string, string]>;
|
|
||||||
/** Returns an array of key, value pairs for every entry in the search params. */
|
|
||||||
entries(): URLSearchParamsIterator<[string, string]>;
|
|
||||||
/** Returns a list of keys in the search params. */
|
|
||||||
keys(): URLSearchParamsIterator<string>;
|
|
||||||
/** Returns a list of values in the search params. */
|
|
||||||
values(): URLSearchParamsIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ViewTransitionTypeSet extends Set<string> {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WEBGL_draw_buffers {
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_draw_buffers.drawBuffersWEBGL()`** method is part of the WebGL API and allows you to define the draw buffers to which all fragment colors are written.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_draw_buffers/drawBuffersWEBGL)
|
|
||||||
*/
|
|
||||||
drawBuffersWEBGL(buffers: Iterable<GLenum>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WEBGL_multi_draw {
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawArraysInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysInstancedWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawArraysInstancedWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawArraysWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawArraysWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawArraysWEBGL(mode: GLenum, firstsList: Int32Array<ArrayBufferLike> | Iterable<GLint>, firstsOffset: number, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, drawcount: GLsizei): void;
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawElementsInstancedWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsInstancedWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawElementsInstancedWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, instanceCountsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, instanceCountsOffset: number, drawcount: GLsizei): void;
|
|
||||||
/**
|
|
||||||
* The **`WEBGL_multi_draw.multiDrawElementsWEBGL()`** method of the WebGL API renders multiple primitives from array data.
|
|
||||||
*
|
|
||||||
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/WEBGL_multi_draw/multiDrawElementsWEBGL)
|
|
||||||
*/
|
|
||||||
multiDrawElementsWEBGL(mode: GLenum, countsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, countsOffset: number, type: GLenum, offsetsList: Int32Array<ArrayBufferLike> | Iterable<GLsizei>, offsetsOffset: number, drawcount: GLsizei): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGL2RenderingContextBase {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
||||||
clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLfloat>, srcOffset?: number): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
||||||
clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLint>, srcOffset?: number): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/clearBuffer) */
|
|
||||||
clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable<GLuint>, srcOffset?: number): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/drawBuffers) */
|
|
||||||
drawBuffers(buffers: Iterable<GLenum>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getActiveUniforms) */
|
|
||||||
getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable<GLuint>, pname: GLenum): any;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/getUniformIndices) */
|
|
||||||
getUniformIndices(program: WebGLProgram, uniformNames: Iterable<string>): GLuint[] | null;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateFramebuffer) */
|
|
||||||
invalidateFramebuffer(target: GLenum, attachments: Iterable<GLenum>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/invalidateSubFramebuffer) */
|
|
||||||
invalidateSubFramebuffer(target: GLenum, attachments: Iterable<GLenum>, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/transformFeedbackVaryings) */
|
|
||||||
transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable<string>, bufferMode: GLenum): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform1uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform2uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform3uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniform) */
|
|
||||||
uniform4uiv(location: WebGLUniformLocation | null, data: Iterable<GLuint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
|
|
||||||
vertexAttribI4iv(index: GLuint, values: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/vertexAttribI) */
|
|
||||||
vertexAttribI4uiv(index: GLuint, values: Iterable<GLuint>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGL2RenderingContextOverloads {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4fv(location: WebGLUniformLocation | null, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4iv(location: WebGLUniformLocation | null, data: Iterable<GLint>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGL2RenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable<GLfloat>, srcOffset?: number, srcLength?: GLuint): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGLRenderingContextBase {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib1fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib2fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib3fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/vertexAttrib) */
|
|
||||||
vertexAttrib4fv(index: GLuint, values: Iterable<GLfloat>): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WebGLRenderingContextOverloads {
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform1iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform2iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform3iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4fv(location: WebGLUniformLocation | null, v: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniform) */
|
|
||||||
uniform4iv(location: WebGLUniformLocation | null, v: Iterable<GLint>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
||||||
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/WebGLRenderingContext/uniformMatrix) */
|
|
||||||
uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable<GLfloat>): void;
|
|
||||||
}
|
|
||||||
@ -1,147 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 WeakKey, 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 or symbol.
|
|
||||||
*/
|
|
||||||
set(key: K, value: V): this;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakMapConstructor {
|
|
||||||
new <K extends WeakKey = WeakKey, V = any>(entries?: readonly (readonly [K, V])[] | null): WeakMap<K, V>;
|
|
||||||
readonly prototype: WeakMap<WeakKey, 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 WeakKey> {
|
|
||||||
/**
|
|
||||||
* Appends a new value 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 a value exists in the WeakSet or not.
|
|
||||||
*/
|
|
||||||
has(value: T): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakSetConstructor {
|
|
||||||
new <T extends WeakKey = WeakKey>(values?: readonly T[] | null): WeakSet<T>;
|
|
||||||
readonly prototype: WeakSet<WeakKey>;
|
|
||||||
}
|
|
||||||
declare var WeakSet: WeakSetConstructor;
|
|
||||||
@ -1,597 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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> {
|
|
||||||
/**
|
|
||||||
* 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<S extends T>(predicate: (value: T, index: number, obj: T[]) => value is S, thisArg?: any): S | undefined;
|
|
||||||
find(predicate: (value: T, index: number, obj: T[]) => unknown, thisArg?: any): T | 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: T, index: number, obj: T[]) => unknown, thisArg?: any): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: T, start?: number, end?: number): this;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ArrayConstructor {
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like object.
|
|
||||||
* @param arrayLike An array-like object to convert to an array.
|
|
||||||
*/
|
|
||||||
from<T>(arrayLike: ArrayLike<T>): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an iterable object.
|
|
||||||
* @param arrayLike An array-like 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>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a new array from a set of elements.
|
|
||||||
* @param items A set of elements to include in the new array object.
|
|
||||||
*/
|
|
||||||
of<T>(...items: T[]): T[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DateConstructor {
|
|
||||||
new (value: number | string | Date): Date;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Function {
|
|
||||||
/**
|
|
||||||
* Returns the name of the function. Function names are read-only and can not be changed.
|
|
||||||
*/
|
|
||||||
readonly name: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Math {
|
|
||||||
/**
|
|
||||||
* Returns the number of leading zero bits in the 32-bit binary representation of a number.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
clz32(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the result of 32-bit multiplication of two numbers.
|
|
||||||
* @param x First number
|
|
||||||
* @param y Second number
|
|
||||||
*/
|
|
||||||
imul(x: number, y: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the sign of the x, indicating whether x is positive, negative or zero.
|
|
||||||
* @param x The numeric expression to test
|
|
||||||
*/
|
|
||||||
sign(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the base 10 logarithm of a number.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
log10(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the base 2 logarithm of a number.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
log2(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the natural logarithm of 1 + x.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
log1p(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the result of (e^x - 1), which is an implementation-dependent approximation to
|
|
||||||
* subtracting 1 from the exponential function of x (e raised to the power of x, where e
|
|
||||||
* is the base of the natural logarithms).
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
expm1(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the hyperbolic cosine of a number.
|
|
||||||
* @param x A numeric expression that contains an angle measured in radians.
|
|
||||||
*/
|
|
||||||
cosh(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the hyperbolic sine of a number.
|
|
||||||
* @param x A numeric expression that contains an angle measured in radians.
|
|
||||||
*/
|
|
||||||
sinh(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the hyperbolic tangent of a number.
|
|
||||||
* @param x A numeric expression that contains an angle measured in radians.
|
|
||||||
*/
|
|
||||||
tanh(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the inverse hyperbolic cosine of a number.
|
|
||||||
* @param x A numeric expression that contains an angle measured in radians.
|
|
||||||
*/
|
|
||||||
acosh(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the inverse hyperbolic sine of a number.
|
|
||||||
* @param x A numeric expression that contains an angle measured in radians.
|
|
||||||
*/
|
|
||||||
asinh(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the inverse hyperbolic tangent of a number.
|
|
||||||
* @param x A numeric expression that contains an angle measured in radians.
|
|
||||||
*/
|
|
||||||
atanh(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the square root of the sum of squares of its arguments.
|
|
||||||
* @param values Values to compute the square root for.
|
|
||||||
* If no arguments are passed, the result is +0.
|
|
||||||
* If there is only one argument, the result is the absolute value.
|
|
||||||
* If any argument is +Infinity or -Infinity, the result is +Infinity.
|
|
||||||
* If any argument is NaN, the result is NaN.
|
|
||||||
* If all arguments are either +0 or −0, the result is +0.
|
|
||||||
*/
|
|
||||||
hypot(...values: number[]): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the integral part of the a numeric expression, x, removing any fractional digits.
|
|
||||||
* If x is already an integer, the result is x.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
trunc(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the nearest single precision float representation of a number.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
fround(x: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an implementation-dependent approximation to the cube root of number.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
cbrt(x: number): number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberConstructor {
|
|
||||||
/**
|
|
||||||
* The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
|
|
||||||
* that is representable as a Number value, which is approximately:
|
|
||||||
* 2.2204460492503130808472633361816 x 10−16.
|
|
||||||
*/
|
|
||||||
readonly EPSILON: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if passed value is finite.
|
|
||||||
* Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a
|
|
||||||
* number. Only finite values of the type number, result in true.
|
|
||||||
* @param number A numeric value.
|
|
||||||
*/
|
|
||||||
isFinite(number: unknown): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the value passed is an integer, false otherwise.
|
|
||||||
* @param number A numeric value.
|
|
||||||
*/
|
|
||||||
isInteger(number: unknown): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
|
|
||||||
* number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
|
|
||||||
* to a number. Only values of the type number, that are also NaN, result in true.
|
|
||||||
* @param number A numeric value.
|
|
||||||
*/
|
|
||||||
isNaN(number: unknown): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the value passed is a safe integer.
|
|
||||||
* @param number A numeric value.
|
|
||||||
*/
|
|
||||||
isSafeInteger(number: unknown): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The value of the largest integer n such that n and n + 1 are both exactly representable as
|
|
||||||
* a Number value.
|
|
||||||
* The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
|
|
||||||
*/
|
|
||||||
readonly MAX_SAFE_INTEGER: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The value of the smallest integer n such that n and n − 1 are both exactly representable as
|
|
||||||
* a Number value.
|
|
||||||
* The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
|
|
||||||
*/
|
|
||||||
readonly MIN_SAFE_INTEGER: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts a string to a floating-point number.
|
|
||||||
* @param string A string that contains a floating-point number.
|
|
||||||
*/
|
|
||||||
parseFloat(string: string): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts A string to an integer.
|
|
||||||
* @param string A string to convert into a number.
|
|
||||||
* @param radix A value between 2 and 36 that specifies the base of the number in `string`.
|
|
||||||
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
|
|
||||||
* All other strings are considered decimal.
|
|
||||||
*/
|
|
||||||
parseInt(string: string, radix?: number): number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ObjectConstructor {
|
|
||||||
/**
|
|
||||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
||||||
* target object. Returns the target object.
|
|
||||||
* @param target The target object to copy to.
|
|
||||||
* @param source The source object from which to copy properties.
|
|
||||||
*/
|
|
||||||
assign<T extends {}, U>(target: T, source: U): T & U;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
||||||
* target object. Returns the target object.
|
|
||||||
* @param target The target object to copy to.
|
|
||||||
* @param source1 The first source object from which to copy properties.
|
|
||||||
* @param source2 The second source object from which to copy properties.
|
|
||||||
*/
|
|
||||||
assign<T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
||||||
* target object. Returns the target object.
|
|
||||||
* @param target The target object to copy to.
|
|
||||||
* @param source1 The first source object from which to copy properties.
|
|
||||||
* @param source2 The second source object from which to copy properties.
|
|
||||||
* @param source3 The third source object from which to copy properties.
|
|
||||||
*/
|
|
||||||
assign<T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
|
||||||
* target object. Returns the target object.
|
|
||||||
* @param target The target object to copy to.
|
|
||||||
* @param sources One or more source objects from which to copy properties
|
|
||||||
*/
|
|
||||||
assign(target: object, ...sources: any[]): any;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of all symbol properties found directly on object o.
|
|
||||||
* @param o Object to retrieve the symbols from.
|
|
||||||
*/
|
|
||||||
getOwnPropertySymbols(o: any): symbol[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the names of the enumerable string properties and methods 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.
|
|
||||||
*/
|
|
||||||
keys(o: {}): string[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the values are the same value, false otherwise.
|
|
||||||
* @param value1 The first value.
|
|
||||||
* @param value2 The second value.
|
|
||||||
*/
|
|
||||||
is(value1: any, value2: any): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the prototype of a specified object o to object proto or null. Returns the object o.
|
|
||||||
* @param o The object to change its prototype.
|
|
||||||
* @param proto The value of the new prototype or null.
|
|
||||||
*/
|
|
||||||
setPrototypeOf(o: any, proto: object | null): any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadonlyArray<T> {
|
|
||||||
/**
|
|
||||||
* 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<S extends T>(predicate: (value: T, index: number, obj: readonly T[]) => value is S, thisArg?: any): S | undefined;
|
|
||||||
find(predicate: (value: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): T | 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: T, index: number, obj: readonly T[]) => unknown, thisArg?: any): number;
|
|
||||||
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions & Intl.DateTimeFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExp {
|
|
||||||
/**
|
|
||||||
* Returns a string indicating the flags of the regular expression in question. This field is read-only.
|
|
||||||
* The characters in this string are sequenced and concatenated in the following order:
|
|
||||||
*
|
|
||||||
* - "g" for global
|
|
||||||
* - "i" for ignoreCase
|
|
||||||
* - "m" for multiline
|
|
||||||
* - "u" for unicode
|
|
||||||
* - "y" for sticky
|
|
||||||
*
|
|
||||||
* If no flags are set, the value is the empty string.
|
|
||||||
*/
|
|
||||||
readonly flags: string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
|
|
||||||
* expression. Default is false. Read-only.
|
|
||||||
*/
|
|
||||||
readonly sticky: boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
|
|
||||||
* expression. Default is false. Read-only.
|
|
||||||
*/
|
|
||||||
readonly unicode: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExpConstructor {
|
|
||||||
new (pattern: RegExp | string, flags?: string): RegExp;
|
|
||||||
(pattern: RegExp | string, flags?: string): RegExp;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface String {
|
|
||||||
/**
|
|
||||||
* Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
|
|
||||||
* value of the UTF-16 encoded code point starting at the string element at position pos in
|
|
||||||
* the String resulting from converting this object to a String.
|
|
||||||
* If there is no element at that position, the result is undefined.
|
|
||||||
* If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
|
|
||||||
*/
|
|
||||||
codePointAt(pos: number): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if searchString appears as a substring of the result of converting this
|
|
||||||
* object to a String, at one or more positions that are
|
|
||||||
* greater than or equal to position; otherwise, returns false.
|
|
||||||
* @param searchString search string
|
|
||||||
* @param position If position is undefined, 0 is assumed, so as to search all of the String.
|
|
||||||
*/
|
|
||||||
includes(searchString: string, position?: number): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
|
||||||
* same as the corresponding elements of this object (converted to a String) starting at
|
|
||||||
* endPosition – length(this). Otherwise returns false.
|
|
||||||
*/
|
|
||||||
endsWith(searchString: string, endPosition?: number): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the String value result of normalizing the string into the normalization form
|
|
||||||
* named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
|
|
||||||
* @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
|
|
||||||
* is "NFC"
|
|
||||||
*/
|
|
||||||
normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the String value result of normalizing the string into the normalization form
|
|
||||||
* named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
|
|
||||||
* @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
|
|
||||||
* is "NFC"
|
|
||||||
*/
|
|
||||||
normalize(form?: string): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a String value that is made from count copies appended together. If count is 0,
|
|
||||||
* the empty string is returned.
|
|
||||||
* @param count number of copies to append
|
|
||||||
*/
|
|
||||||
repeat(count: number): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the sequence of elements of searchString converted to a String is the
|
|
||||||
* same as the corresponding elements of this object (converted to a String) starting at
|
|
||||||
* position. Otherwise returns false.
|
|
||||||
*/
|
|
||||||
startsWith(searchString: string, position?: number): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an `<a>` HTML anchor element and sets the name attribute to the text value
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
* @param name
|
|
||||||
*/
|
|
||||||
anchor(name: string): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<big>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
big(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<blink>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
blink(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<b>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
bold(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<tt>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
fixed(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<font>` HTML element and sets the color attribute value
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
fontcolor(color: string): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<font>` HTML element and sets the size attribute value
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
fontsize(size: number): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<font>` HTML element and sets the size attribute value
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
fontsize(size: string): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an `<i>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
italics(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an `<a>` HTML element and sets the href attribute value
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
link(url: string): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<small>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
small(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<strike>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
strike(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<sub>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
sub(): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a `<sup>` HTML element
|
|
||||||
* @deprecated A legacy feature for browser compatibility
|
|
||||||
*/
|
|
||||||
sup(): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface StringConstructor {
|
|
||||||
/**
|
|
||||||
* Return the String value whose elements are, in order, the elements in the List elements.
|
|
||||||
* If length is 0, the empty string is returned.
|
|
||||||
*/
|
|
||||||
fromCodePoint(...codePoints: number[]): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* String.raw is usually used as a tag function of a Tagged Template String. When called as
|
|
||||||
* such, the first argument will be a well formed template call site object and the rest
|
|
||||||
* parameter will contain the substitution values. It can also be called directly, for example,
|
|
||||||
* to interleave strings and values from your own tag function, and in this case the only thing
|
|
||||||
* it needs from the first argument is the raw property.
|
|
||||||
* @param template A well-formed template string call site representation.
|
|
||||||
* @param substitutions A set of substitution values.
|
|
||||||
*/
|
|
||||||
raw(template: { raw: readonly string[] | ArrayLike<string>; }, ...substitutions: any[]): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
toLocaleString(locales: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 = any> extends IteratorObject<T, TReturn, TNext> {
|
|
||||||
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
||||||
next(...[value]: [] | [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;
|
|
||||||
}
|
|
||||||
@ -1,605 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 = any> {
|
|
||||||
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
||||||
next(...[value]: [] | [TNext]): IteratorResult<T, TReturn>;
|
|
||||||
return?(value?: TReturn): IteratorResult<T, TReturn>;
|
|
||||||
throw?(e?: any): IteratorResult<T, TReturn>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Iterable<T, TReturn = any, TNext = any> {
|
|
||||||
[Symbol.iterator](): Iterator<T, TReturn, TNext>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes a user-defined {@link Iterator} that is also iterable.
|
|
||||||
*/
|
|
||||||
interface IterableIterator<T, TReturn = any, TNext = any> extends Iterator<T, TReturn, TNext> {
|
|
||||||
[Symbol.iterator](): IterableIterator<T, TReturn, TNext>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes an {@link Iterator} produced by the runtime that inherits from the intrinsic `Iterator.prototype`.
|
|
||||||
*/
|
|
||||||
interface IteratorObject<T, TReturn = unknown, TNext = unknown> extends Iterator<T, TReturn, TNext> {
|
|
||||||
[Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines the `TReturn` type used for built-in iterators produced by `Array`, `Map`, `Set`, and others.
|
|
||||||
* This is `undefined` when `strictBuiltInIteratorReturn` is `true`; otherwise, this is `any`.
|
|
||||||
*/
|
|
||||||
type BuiltinIteratorReturn = intrinsic;
|
|
||||||
|
|
||||||
interface ArrayIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Array<T> {
|
|
||||||
/** Iterator */
|
|
||||||
[Symbol.iterator](): ArrayIterator<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, T]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<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](): ArrayIterator<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, T]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IArguments {
|
|
||||||
/** Iterator */
|
|
||||||
[Symbol.iterator](): ArrayIterator<any>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MapIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): MapIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Map<K, V> {
|
|
||||||
/** Returns an iterable of entries in the map. */
|
|
||||||
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of key, value pairs for every entry in the map.
|
|
||||||
*/
|
|
||||||
entries(): MapIterator<[K, V]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of keys in the map
|
|
||||||
*/
|
|
||||||
keys(): MapIterator<K>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of values in the map
|
|
||||||
*/
|
|
||||||
values(): MapIterator<V>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadonlyMap<K, V> {
|
|
||||||
/** Returns an iterable of entries in the map. */
|
|
||||||
[Symbol.iterator](): MapIterator<[K, V]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of key, value pairs for every entry in the map.
|
|
||||||
*/
|
|
||||||
entries(): MapIterator<[K, V]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of keys in the map
|
|
||||||
*/
|
|
||||||
keys(): MapIterator<K>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of values in the map
|
|
||||||
*/
|
|
||||||
values(): MapIterator<V>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface MapConstructor {
|
|
||||||
new (): Map<any, any>;
|
|
||||||
new <K, V>(iterable?: Iterable<readonly [K, V]> | null): Map<K, V>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakMap<K extends WeakKey, V> {}
|
|
||||||
|
|
||||||
interface WeakMapConstructor {
|
|
||||||
new <K extends WeakKey, V>(iterable: Iterable<readonly [K, V]>): WeakMap<K, V>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SetIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): SetIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Set<T> {
|
|
||||||
/** Iterates over values in the set. */
|
|
||||||
[Symbol.iterator](): SetIterator<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
|
||||||
*/
|
|
||||||
entries(): SetIterator<[T, T]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Despite its name, returns an iterable of the values in the set.
|
|
||||||
*/
|
|
||||||
keys(): SetIterator<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of values in the set.
|
|
||||||
*/
|
|
||||||
values(): SetIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadonlySet<T> {
|
|
||||||
/** Iterates over values in the set. */
|
|
||||||
[Symbol.iterator](): SetIterator<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of [v,v] pairs for every value `v` in the set.
|
|
||||||
*/
|
|
||||||
entries(): SetIterator<[T, T]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Despite its name, returns an iterable of the values in the set.
|
|
||||||
*/
|
|
||||||
keys(): SetIterator<T>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an iterable of values in the set.
|
|
||||||
*/
|
|
||||||
values(): SetIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SetConstructor {
|
|
||||||
new <T>(iterable?: Iterable<T> | null): Set<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakSet<T extends WeakKey> {}
|
|
||||||
|
|
||||||
interface WeakSetConstructor {
|
|
||||||
new <T extends WeakKey = WeakKey>(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 StringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): StringIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface String {
|
|
||||||
/** Iterator */
|
|
||||||
[Symbol.iterator](): StringIterator<string>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int8ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Int8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Int8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int8Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Uint8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Uint8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Int16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Int16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Uint16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Uint16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Int32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Int32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Int32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Uint32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Uint32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Uint32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Float32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Float32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64ArrayConstructor {
|
|
||||||
new (elements: Iterable<number>): Float64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Float64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
@ -1,128 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
@ -1,144 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,46 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
@ -1,326 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 WeakKey, V> {
|
|
||||||
readonly [Symbol.toStringTag]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Set<T> {
|
|
||||||
readonly [Symbol.toStringTag]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakSet<T extends WeakKey> {
|
|
||||||
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]: "ArrayBuffer";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DataView<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Int8Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Uint8Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Uint8ClampedArray";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Int16Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Uint16Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Int32Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Uint32Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
readonly [Symbol.toStringTag]: "Float32Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,116 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="es2016.intl" />
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* The `Intl.getCanonicalLocales()` method returns an array containing
|
|
||||||
* the canonical locale names. Duplicates will be omitted and elements
|
|
||||||
* will be validated as structurally valid language tags.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/getCanonicalLocales)
|
|
||||||
*
|
|
||||||
* @param locale A list of String values for which to get the canonical locale names
|
|
||||||
* @returns An array containing the canonical and validated locale names.
|
|
||||||
*/
|
|
||||||
function getCanonicalLocales(locale?: string | readonly string[]): string[];
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 ArrayBufferConstructor {
|
|
||||||
new (): ArrayBuffer;
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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.arraybuffer" />
|
|
||||||
/// <reference lib="es2017.date" />
|
|
||||||
/// <reference lib="es2017.intl" />
|
|
||||||
/// <reference lib="es2017.object" />
|
|
||||||
/// <reference lib="es2017.sharedmemory" />
|
|
||||||
/// <reference lib="es2017.string" />
|
|
||||||
/// <reference lib="es2017.typedarrays" />
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 DateConstructor {
|
|
||||||
/**
|
|
||||||
* Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
|
|
||||||
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
|
|
||||||
* @param monthIndex The month as a number between 0 and 11 (January to December).
|
|
||||||
* @param date The date as a number between 1 and 31.
|
|
||||||
* @param hours Must be supplied if minutes is supplied. A number from 0 to 23 (midnight to 11pm) that specifies the hour.
|
|
||||||
* @param minutes Must be supplied if seconds is supplied. A number from 0 to 59 that specifies the minutes.
|
|
||||||
* @param seconds Must be supplied if milliseconds is supplied. A number from 0 to 59 that specifies the seconds.
|
|
||||||
* @param ms A number from 0 to 999 that specifies the milliseconds.
|
|
||||||
*/
|
|
||||||
UTC(year: number, monthIndex?: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number;
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,49 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 own 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 own 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 own 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 own 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; };
|
|
||||||
}
|
|
||||||
@ -1,135 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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.toStringTag]: "SharedArrayBuffer";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SharedArrayBufferConstructor {
|
|
||||||
readonly prototype: SharedArrayBuffer;
|
|
||||||
new (byteLength?: number): SharedArrayBuffer;
|
|
||||||
readonly [Symbol.species]: SharedArrayBufferConstructor;
|
|
||||||
}
|
|
||||||
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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, 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<ArrayBufferLike>, 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<ArrayBufferLike>.
|
|
||||||
* @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<ArrayBufferLike>, 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<ArrayBufferLike> | Uint8Array<ArrayBufferLike> | Int16Array<ArrayBufferLike> | Uint16Array<ArrayBufferLike> | Int32Array<ArrayBufferLike> | Uint32Array<ArrayBufferLike>, index: number, value: number): number;
|
|
||||||
|
|
||||||
readonly [Symbol.toStringTag]: "Atomics";
|
|
||||||
}
|
|
||||||
|
|
||||||
declare var Atomics: Atomics;
|
|
||||||
@ -1,45 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ArrayConstructor {
|
|
||||||
new (): Uint8Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArrayConstructor {
|
|
||||||
new (): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16ArrayConstructor {
|
|
||||||
new (): Int16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16ArrayConstructor {
|
|
||||||
new (): Uint16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32ArrayConstructor {
|
|
||||||
new (): Int32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32ArrayConstructor {
|
|
||||||
new (): Uint32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32ArrayConstructor {
|
|
||||||
new (): Float32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64ArrayConstructor {
|
|
||||||
new (): Float64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
@ -1,77 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 = any> extends AsyncIteratorObject<T, TReturn, TNext> {
|
|
||||||
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
||||||
next(...[value]: [] | [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;
|
|
||||||
}
|
|
||||||
@ -1,53 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 = any> {
|
|
||||||
// NOTE: 'next' is defined using a tuple to ensure we report the correct assignability errors in all places.
|
|
||||||
next(...[value]: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
|
|
||||||
return?(value?: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
|
|
||||||
throw?(e?: any): Promise<IteratorResult<T, TReturn>>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AsyncIterable<T, TReturn = any, TNext = any> {
|
|
||||||
[Symbol.asyncIterator](): AsyncIterator<T, TReturn, TNext>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes a user-defined {@link AsyncIterator} that is also async iterable.
|
|
||||||
*/
|
|
||||||
interface AsyncIterableIterator<T, TReturn = any, TNext = any> extends AsyncIterator<T, TReturn, TNext> {
|
|
||||||
[Symbol.asyncIterator](): AsyncIterableIterator<T, TReturn, TNext>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Describes an {@link AsyncIterator} produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`.
|
|
||||||
*/
|
|
||||||
interface AsyncIteratorObject<T, TReturn = unknown, TNext = unknown> extends AsyncIterator<T, TReturn, TNext> {
|
|
||||||
[Symbol.asyncIterator](): AsyncIteratorObject<T, TReturn, TNext>;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,83 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PluralRulesConstructor {
|
|
||||||
new (locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules;
|
|
||||||
(locales?: string | readonly string[], options?: PluralRulesOptions): PluralRules;
|
|
||||||
supportedLocalesOf(locales: string | readonly string[], options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const PluralRules: PluralRulesConstructor;
|
|
||||||
|
|
||||||
interface NumberFormatPartTypeRegistry {
|
|
||||||
literal: never;
|
|
||||||
nan: never;
|
|
||||||
infinity: never;
|
|
||||||
percent: never;
|
|
||||||
integer: never;
|
|
||||||
group: never;
|
|
||||||
decimal: never;
|
|
||||||
fraction: never;
|
|
||||||
plusSign: never;
|
|
||||||
minusSign: never;
|
|
||||||
percentSign: never;
|
|
||||||
currency: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
type NumberFormatPartTypes = keyof NumberFormatPartTypeRegistry;
|
|
||||||
|
|
||||||
interface NumberFormatPart {
|
|
||||||
type: NumberFormatPartTypes;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormat {
|
|
||||||
formatToParts(number?: number | bigint): NumberFormatPart[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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>;
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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>[];
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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: never;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,37 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,765 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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/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<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
||||||
/** The size in bytes of each element in the array. */
|
|
||||||
readonly BYTES_PER_ELEMENT: number;
|
|
||||||
|
|
||||||
/** The ArrayBuffer instance referenced by the array. */
|
|
||||||
readonly buffer: TArrayBuffer;
|
|
||||||
|
|
||||||
/** 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(): ArrayIterator<[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<TArrayBuffer>) => 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<TArrayBuffer>) => any, thisArg?: any): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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(): ArrayIterator<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<TArrayBuffer>) => bigint, thisArg?: any): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer>) => 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<TArrayBuffer>;
|
|
||||||
|
|
||||||
/** Converts the array to a string by using the current locale. */
|
|
||||||
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
|
|
||||||
/** Returns a string representation of the array. */
|
|
||||||
toString(): string;
|
|
||||||
|
|
||||||
/** Returns the primitive value of the specified object. */
|
|
||||||
valueOf(): BigInt64Array<TArrayBuffer>;
|
|
||||||
|
|
||||||
/** Yields each value in the array. */
|
|
||||||
values(): ArrayIterator<bigint>;
|
|
||||||
|
|
||||||
[Symbol.iterator](): ArrayIterator<bigint>;
|
|
||||||
|
|
||||||
readonly [Symbol.toStringTag]: "BigInt64Array";
|
|
||||||
|
|
||||||
[index: number]: bigint;
|
|
||||||
}
|
|
||||||
interface BigInt64ArrayConstructor {
|
|
||||||
readonly prototype: BigInt64Array<ArrayBufferLike>;
|
|
||||||
new (length?: number): BigInt64Array<ArrayBuffer>;
|
|
||||||
new (array: ArrayLike<bigint> | Iterable<bigint>): BigInt64Array<ArrayBuffer>;
|
|
||||||
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): BigInt64Array<TArrayBuffer>;
|
|
||||||
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigInt64Array<ArrayBuffer>;
|
|
||||||
new (array: ArrayLike<bigint> | ArrayBuffer): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/** 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<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param arrayLike An array-like object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(arrayLike: ArrayLike<bigint>): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param arrayLike An array-like 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<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<bigint>): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigInt64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
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<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
||||||
/** The size in bytes of each element in the array. */
|
|
||||||
readonly BYTES_PER_ELEMENT: number;
|
|
||||||
|
|
||||||
/** The ArrayBuffer instance referenced by the array. */
|
|
||||||
readonly buffer: TArrayBuffer;
|
|
||||||
|
|
||||||
/** 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(): ArrayIterator<[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<TArrayBuffer>) => 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<TArrayBuffer>) => any, thisArg?: any): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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(): ArrayIterator<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<TArrayBuffer>) => bigint, thisArg?: any): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<TArrayBuffer>) => 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<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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<TArrayBuffer>) => 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<TArrayBuffer>;
|
|
||||||
|
|
||||||
/** Converts the array to a string by using the current locale. */
|
|
||||||
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
|
|
||||||
/** Returns a string representation of the array. */
|
|
||||||
toString(): string;
|
|
||||||
|
|
||||||
/** Returns the primitive value of the specified object. */
|
|
||||||
valueOf(): BigUint64Array<TArrayBuffer>;
|
|
||||||
|
|
||||||
/** Yields each value in the array. */
|
|
||||||
values(): ArrayIterator<bigint>;
|
|
||||||
|
|
||||||
[Symbol.iterator](): ArrayIterator<bigint>;
|
|
||||||
|
|
||||||
readonly [Symbol.toStringTag]: "BigUint64Array";
|
|
||||||
|
|
||||||
[index: number]: bigint;
|
|
||||||
}
|
|
||||||
interface BigUint64ArrayConstructor {
|
|
||||||
readonly prototype: BigUint64Array<ArrayBufferLike>;
|
|
||||||
new (length?: number): BigUint64Array<ArrayBuffer>;
|
|
||||||
new (array: ArrayLike<bigint> | Iterable<bigint>): BigUint64Array<ArrayBuffer>;
|
|
||||||
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): BigUint64Array<TArrayBuffer>;
|
|
||||||
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): BigUint64Array<ArrayBuffer>;
|
|
||||||
new (array: ArrayLike<bigint> | ArrayBuffer): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/** 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<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param arrayLike An array-like object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(arrayLike: ArrayLike<bigint>): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param arrayLike An array-like 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<U>(arrayLike: ArrayLike<U>, mapfn: (v: U, k: number) => bigint, thisArg?: any): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<bigint>): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => bigint, thisArg?: any): BigUint64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
declare var BigUint64Array: BigUint64ArrayConstructor;
|
|
||||||
|
|
||||||
interface DataView<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,27 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,474 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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.intl" />
|
|
||||||
declare namespace Intl {
|
|
||||||
/**
|
|
||||||
* A string that is a valid [Unicode BCP 47 Locale Identifier](https://unicode.org/reports/tr35/#Unicode_locale_identifier).
|
|
||||||
*
|
|
||||||
* For example: "fa", "es-MX", "zh-Hant-TW".
|
|
||||||
*
|
|
||||||
* See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
||||||
*/
|
|
||||||
type UnicodeBCP47LocaleIdentifier = string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unit to use in the relative time internationalized message.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format#Parameters).
|
|
||||||
*/
|
|
||||||
type RelativeTimeFormatUnit =
|
|
||||||
| "year"
|
|
||||||
| "years"
|
|
||||||
| "quarter"
|
|
||||||
| "quarters"
|
|
||||||
| "month"
|
|
||||||
| "months"
|
|
||||||
| "week"
|
|
||||||
| "weeks"
|
|
||||||
| "day"
|
|
||||||
| "days"
|
|
||||||
| "hour"
|
|
||||||
| "hours"
|
|
||||||
| "minute"
|
|
||||||
| "minutes"
|
|
||||||
| "second"
|
|
||||||
| "seconds";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Value of the `unit` property in objects returned by
|
|
||||||
* `Intl.RelativeTimeFormat.prototype.formatToParts()`. `formatToParts` and
|
|
||||||
* `format` methods accept either singular or plural unit names as input,
|
|
||||||
* but `formatToParts` only outputs singular (e.g. "day") not plural (e.g.
|
|
||||||
* "days").
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
|
||||||
*/
|
|
||||||
type RelativeTimeFormatUnitSingular =
|
|
||||||
| "year"
|
|
||||||
| "quarter"
|
|
||||||
| "month"
|
|
||||||
| "week"
|
|
||||||
| "day"
|
|
||||||
| "hour"
|
|
||||||
| "minute"
|
|
||||||
| "second";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The locale matching algorithm to use.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation).
|
|
||||||
*/
|
|
||||||
type RelativeTimeFormatLocaleMatcher = "lookup" | "best fit";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The format of output message.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
|
||||||
*/
|
|
||||||
type RelativeTimeFormatNumeric = "always" | "auto";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The length of the internationalized message.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
|
||||||
*/
|
|
||||||
type RelativeTimeFormatStyle = "long" | "short" | "narrow";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The locale or locales to use
|
|
||||||
*
|
|
||||||
* See [MDN - Intl - locales argument](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument).
|
|
||||||
*/
|
|
||||||
type LocalesArgument = UnicodeBCP47LocaleIdentifier | Locale | readonly (UnicodeBCP47LocaleIdentifier | Locale)[] | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object with some or all of properties of `options` parameter
|
|
||||||
* of `Intl.RelativeTimeFormat` constructor.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters).
|
|
||||||
*/
|
|
||||||
interface RelativeTimeFormatOptions {
|
|
||||||
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
||||||
localeMatcher?: RelativeTimeFormatLocaleMatcher;
|
|
||||||
/** The format of output message. */
|
|
||||||
numeric?: RelativeTimeFormatNumeric;
|
|
||||||
/** The length of the internationalized message. */
|
|
||||||
style?: RelativeTimeFormatStyle;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object with properties reflecting the locale
|
|
||||||
* and formatting options computed during initialization
|
|
||||||
* of the `Intl.RelativeTimeFormat` object
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions#Description).
|
|
||||||
*/
|
|
||||||
interface ResolvedRelativeTimeFormatOptions {
|
|
||||||
locale: UnicodeBCP47LocaleIdentifier;
|
|
||||||
style: RelativeTimeFormatStyle;
|
|
||||||
numeric: RelativeTimeFormatNumeric;
|
|
||||||
numberingSystem: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object representing the relative time format in parts
|
|
||||||
* that can be used for custom locale-aware formatting.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts#Using_formatToParts).
|
|
||||||
*/
|
|
||||||
type RelativeTimeFormatPart =
|
|
||||||
| {
|
|
||||||
type: "literal";
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
type: Exclude<NumberFormatPartTypes, "literal">;
|
|
||||||
value: string;
|
|
||||||
unit: RelativeTimeFormatUnitSingular;
|
|
||||||
};
|
|
||||||
|
|
||||||
interface RelativeTimeFormat {
|
|
||||||
/**
|
|
||||||
* Formats a value and a unit according to the locale
|
|
||||||
* and formatting options of the given
|
|
||||||
* [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
|
|
||||||
* object.
|
|
||||||
*
|
|
||||||
* While this method automatically provides the correct plural forms,
|
|
||||||
* the grammatical form is otherwise as neutral as possible.
|
|
||||||
*
|
|
||||||
* It is the caller's responsibility to handle cut-off logic
|
|
||||||
* such as deciding between displaying "in 7 days" or "in 1 week".
|
|
||||||
* This API does not support relative dates involving compound units.
|
|
||||||
* e.g "in 5 days and 4 hours".
|
|
||||||
*
|
|
||||||
* @param value - Numeric value to use in the internationalized relative time message
|
|
||||||
*
|
|
||||||
* @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message.
|
|
||||||
*
|
|
||||||
* @throws `RangeError` if `unit` was given something other than `unit` possible values
|
|
||||||
*
|
|
||||||
* @returns {string} Internationalized relative time message as string
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/format).
|
|
||||||
*/
|
|
||||||
format(value: number, unit: RelativeTimeFormatUnit): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of objects representing the relative time format in parts that can be used for custom locale-aware formatting.
|
|
||||||
*
|
|
||||||
* @param value - Numeric value to use in the internationalized relative time message
|
|
||||||
*
|
|
||||||
* @param unit - [Unit](https://tc39.es/ecma402/#sec-singularrelativetimeunit) to use in the relative time internationalized message.
|
|
||||||
*
|
|
||||||
* @throws `RangeError` if `unit` was given something other than `unit` possible values
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/formatToParts).
|
|
||||||
*/
|
|
||||||
formatToParts(value: number, unit: RelativeTimeFormatUnit): RelativeTimeFormatPart[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides access to the locale and options computed during initialization of this `Intl.RelativeTimeFormat` object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/resolvedOptions).
|
|
||||||
*/
|
|
||||||
resolvedOptions(): ResolvedRelativeTimeFormatOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The [`Intl.RelativeTimeFormat`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat)
|
|
||||||
* object is a constructor for objects that enable language-sensitive relative time formatting.
|
|
||||||
*
|
|
||||||
* [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat#Browser_compatibility).
|
|
||||||
*/
|
|
||||||
const RelativeTimeFormat: {
|
|
||||||
/**
|
|
||||||
* Creates [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) objects
|
|
||||||
*
|
|
||||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
||||||
* For the general form and interpretation of the locales argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
|
|
||||||
* with some or all of options of `RelativeTimeFormatOptions`.
|
|
||||||
*
|
|
||||||
* @returns [Intl.RelativeTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/RelativeTimeFormat) object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat).
|
|
||||||
*/
|
|
||||||
new (
|
|
||||||
locales?: LocalesArgument,
|
|
||||||
options?: RelativeTimeFormatOptions,
|
|
||||||
): RelativeTimeFormat;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array containing those of the provided locales
|
|
||||||
* that are supported in date and time formatting
|
|
||||||
* without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
||||||
* For the general form and interpretation of the locales argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/RelativeTimeFormat#Parameters)
|
|
||||||
* with some or all of options of the formatting.
|
|
||||||
*
|
|
||||||
* @returns An array containing those of the provided locales
|
|
||||||
* that are supported in date and time formatting
|
|
||||||
* without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/RelativeTimeFormat/supportedLocalesOf).
|
|
||||||
*/
|
|
||||||
supportedLocalesOf(
|
|
||||||
locales?: LocalesArgument,
|
|
||||||
options?: RelativeTimeFormatOptions,
|
|
||||||
): UnicodeBCP47LocaleIdentifier[];
|
|
||||||
};
|
|
||||||
|
|
||||||
interface NumberFormatOptionsStyleRegistry {
|
|
||||||
unit: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormatOptionsCurrencyDisplayRegistry {
|
|
||||||
narrowSymbol: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormatOptionsSignDisplayRegistry {
|
|
||||||
auto: never;
|
|
||||||
never: never;
|
|
||||||
always: never;
|
|
||||||
exceptZero: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
type NumberFormatOptionsSignDisplay = keyof NumberFormatOptionsSignDisplayRegistry;
|
|
||||||
|
|
||||||
interface NumberFormatOptions {
|
|
||||||
numberingSystem?: string | undefined;
|
|
||||||
compactDisplay?: "short" | "long" | undefined;
|
|
||||||
notation?: "standard" | "scientific" | "engineering" | "compact" | undefined;
|
|
||||||
signDisplay?: NumberFormatOptionsSignDisplay | undefined;
|
|
||||||
unit?: string | undefined;
|
|
||||||
unitDisplay?: "short" | "long" | "narrow" | undefined;
|
|
||||||
currencySign?: "standard" | "accounting" | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ResolvedNumberFormatOptions {
|
|
||||||
compactDisplay?: "short" | "long";
|
|
||||||
notation: "standard" | "scientific" | "engineering" | "compact";
|
|
||||||
signDisplay: NumberFormatOptionsSignDisplay;
|
|
||||||
unit?: string;
|
|
||||||
unitDisplay?: "short" | "long" | "narrow";
|
|
||||||
currencySign?: "standard" | "accounting";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormatPartTypeRegistry {
|
|
||||||
compact: never;
|
|
||||||
exponentInteger: never;
|
|
||||||
exponentMinusSign: never;
|
|
||||||
exponentSeparator: never;
|
|
||||||
unit: never;
|
|
||||||
unknown: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DateTimeFormatOptions {
|
|
||||||
calendar?: string | undefined;
|
|
||||||
dayPeriod?: "narrow" | "short" | "long" | undefined;
|
|
||||||
numberingSystem?: string | undefined;
|
|
||||||
|
|
||||||
dateStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
||||||
timeStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
||||||
hourCycle?: "h11" | "h12" | "h23" | "h24" | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
type LocaleHourCycleKey = "h12" | "h23" | "h11" | "h24";
|
|
||||||
type LocaleCollationCaseFirst = "upper" | "lower" | "false";
|
|
||||||
|
|
||||||
interface LocaleOptions {
|
|
||||||
/** A string containing the language, and the script and region if available. */
|
|
||||||
baseName?: string;
|
|
||||||
/** The part of the Locale that indicates the locale's calendar era. */
|
|
||||||
calendar?: string;
|
|
||||||
/** Flag that defines whether case is taken into account for the locale's collation rules. */
|
|
||||||
caseFirst?: LocaleCollationCaseFirst;
|
|
||||||
/** The collation type used for sorting */
|
|
||||||
collation?: string;
|
|
||||||
/** The time keeping format convention used by the locale. */
|
|
||||||
hourCycle?: LocaleHourCycleKey;
|
|
||||||
/** The primary language subtag associated with the locale. */
|
|
||||||
language?: string;
|
|
||||||
/** The numeral system used by the locale. */
|
|
||||||
numberingSystem?: string;
|
|
||||||
/** Flag that defines whether the locale has special collation handling for numeric characters. */
|
|
||||||
numeric?: boolean;
|
|
||||||
/** The region of the world (usually a country) associated with the locale. Possible values are region codes as defined by ISO 3166-1. */
|
|
||||||
region?: string;
|
|
||||||
/** The script used for writing the particular language used in the locale. Possible values are script codes as defined by ISO 15924. */
|
|
||||||
script?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Locale extends LocaleOptions {
|
|
||||||
/** A string containing the language, and the script and region if available. */
|
|
||||||
baseName: string;
|
|
||||||
/** The primary language subtag associated with the locale. */
|
|
||||||
language: string;
|
|
||||||
/** Gets the most likely values for the language, script, and region of the locale based on existing values. */
|
|
||||||
maximize(): Locale;
|
|
||||||
/** Attempts to remove information about the locale that would be added by calling `Locale.maximize()`. */
|
|
||||||
minimize(): Locale;
|
|
||||||
/** Returns the locale's full locale identifier string. */
|
|
||||||
toString(): UnicodeBCP47LocaleIdentifier;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Constructor creates [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale)
|
|
||||||
* objects
|
|
||||||
*
|
|
||||||
* @param tag - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646).
|
|
||||||
* For the general form and interpretation of the locales argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/Locale#Parameters) with some or all of options of the locale.
|
|
||||||
*
|
|
||||||
* @returns [Intl.Locale](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale) object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale).
|
|
||||||
*/
|
|
||||||
const Locale: {
|
|
||||||
new (tag: UnicodeBCP47LocaleIdentifier | Locale, options?: LocaleOptions): Locale;
|
|
||||||
};
|
|
||||||
|
|
||||||
type DisplayNamesFallback =
|
|
||||||
| "code"
|
|
||||||
| "none";
|
|
||||||
|
|
||||||
type DisplayNamesType =
|
|
||||||
| "language"
|
|
||||||
| "region"
|
|
||||||
| "script"
|
|
||||||
| "calendar"
|
|
||||||
| "dateTimeField"
|
|
||||||
| "currency";
|
|
||||||
|
|
||||||
type DisplayNamesLanguageDisplay =
|
|
||||||
| "dialect"
|
|
||||||
| "standard";
|
|
||||||
|
|
||||||
interface DisplayNamesOptions {
|
|
||||||
localeMatcher?: RelativeTimeFormatLocaleMatcher;
|
|
||||||
style?: RelativeTimeFormatStyle;
|
|
||||||
type: DisplayNamesType;
|
|
||||||
languageDisplay?: DisplayNamesLanguageDisplay;
|
|
||||||
fallback?: DisplayNamesFallback;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ResolvedDisplayNamesOptions {
|
|
||||||
locale: UnicodeBCP47LocaleIdentifier;
|
|
||||||
style: RelativeTimeFormatStyle;
|
|
||||||
type: DisplayNamesType;
|
|
||||||
fallback: DisplayNamesFallback;
|
|
||||||
languageDisplay?: DisplayNamesLanguageDisplay;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DisplayNames {
|
|
||||||
/**
|
|
||||||
* Receives a code and returns a string based on the locale and options provided when instantiating
|
|
||||||
* [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)
|
|
||||||
*
|
|
||||||
* @param code The `code` to provide depends on the `type` passed to display name during creation:
|
|
||||||
* - If the type is `"region"`, code should be either an [ISO-3166 two letters region code](https://www.iso.org/iso-3166-country-codes.html),
|
|
||||||
* or a [three digits UN M49 Geographic Regions](https://unstats.un.org/unsd/methodology/m49/).
|
|
||||||
* - If the type is `"script"`, code should be an [ISO-15924 four letters script code](https://unicode.org/iso15924/iso15924-codes.html).
|
|
||||||
* - If the type is `"language"`, code should be a `languageCode` ["-" `scriptCode`] ["-" `regionCode` ] *("-" `variant` )
|
|
||||||
* subsequence of the unicode_language_id grammar in [UTS 35's Unicode Language and Locale Identifiers grammar](https://unicode.org/reports/tr35/#Unicode_language_identifier).
|
|
||||||
* `languageCode` is either a two letters ISO 639-1 language code or a three letters ISO 639-2 language code.
|
|
||||||
* - If the type is `"currency"`, code should be a [3-letter ISO 4217 currency code](https://www.iso.org/iso-4217-currency-codes.html).
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/of).
|
|
||||||
*/
|
|
||||||
of(code: string): string | undefined;
|
|
||||||
/**
|
|
||||||
* Returns a new object with properties reflecting the locale and style formatting options computed during the construction of the current
|
|
||||||
* [`Intl/DisplayNames`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames) object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/resolvedOptions).
|
|
||||||
*/
|
|
||||||
resolvedOptions(): ResolvedDisplayNamesOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The [`Intl.DisplayNames()`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames)
|
|
||||||
* object enables the consistent translation of language, region and script display names.
|
|
||||||
*
|
|
||||||
* [Compatibility](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames#browser_compatibility).
|
|
||||||
*/
|
|
||||||
const DisplayNames: {
|
|
||||||
prototype: DisplayNames;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param locales A string with a BCP 47 language tag, or an array of such strings.
|
|
||||||
* For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation)
|
|
||||||
* page.
|
|
||||||
*
|
|
||||||
* @param options An object for setting up a display name.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/DisplayNames).
|
|
||||||
*/
|
|
||||||
new (locales: LocalesArgument, options: DisplayNamesOptions): DisplayNames;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array containing those of the provided locales that are supported in display names without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* @param locales A string with a BCP 47 language tag, or an array of such strings.
|
|
||||||
* For the general form and interpretation of the `locales` argument, see the [Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#locale_identification_and_negotiation)
|
|
||||||
* page.
|
|
||||||
*
|
|
||||||
* @param options An object with a locale matcher.
|
|
||||||
*
|
|
||||||
* @returns An array of strings representing a subset of the given locale tags that are supported in display names without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames/supportedLocalesOf).
|
|
||||||
*/
|
|
||||||
supportedLocalesOf(locales?: LocalesArgument, options?: { localeMatcher?: RelativeTimeFormatLocaleMatcher; }): UnicodeBCP47LocaleIdentifier[];
|
|
||||||
};
|
|
||||||
|
|
||||||
interface CollatorConstructor {
|
|
||||||
new (locales?: LocalesArgument, options?: CollatorOptions): Collator;
|
|
||||||
(locales?: LocalesArgument, options?: CollatorOptions): Collator;
|
|
||||||
supportedLocalesOf(locales: LocalesArgument, options?: CollatorOptions): string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DateTimeFormatConstructor {
|
|
||||||
new (locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat;
|
|
||||||
(locales?: LocalesArgument, options?: DateTimeFormatOptions): DateTimeFormat;
|
|
||||||
supportedLocalesOf(locales: LocalesArgument, options?: DateTimeFormatOptions): string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormatConstructor {
|
|
||||||
new (locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat;
|
|
||||||
(locales?: LocalesArgument, options?: NumberFormatOptions): NumberFormat;
|
|
||||||
supportedLocalesOf(locales: LocalesArgument, options?: NumberFormatOptions): string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PluralRulesConstructor {
|
|
||||||
new (locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules;
|
|
||||||
(locales?: LocalesArgument, options?: PluralRulesOptions): PluralRules;
|
|
||||||
|
|
||||||
supportedLocalesOf(locales: LocalesArgument, options?: { localeMatcher?: "lookup" | "best fit"; }): string[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 Number {
|
|
||||||
/**
|
|
||||||
* Converts a number 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.NumberFormatOptions): string;
|
|
||||||
}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 PromiseFulfilledResult<T> {
|
|
||||||
status: "fulfilled";
|
|
||||||
value: T;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PromiseRejectedResult {
|
|
||||||
status: "rejected";
|
|
||||||
reason: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
type PromiseSettledResult<T> = PromiseFulfilledResult<T> | PromiseRejectedResult;
|
|
||||||
|
|
||||||
interface PromiseConstructor {
|
|
||||||
/**
|
|
||||||
* Creates a Promise that is resolved with an array of results when all
|
|
||||||
* of the provided Promises resolve or reject.
|
|
||||||
* @param values An array of Promises.
|
|
||||||
* @returns A new Promise.
|
|
||||||
*/
|
|
||||||
allSettled<T extends readonly unknown[] | []>(values: T): Promise<{ -readonly [P in keyof T]: PromiseSettledResult<Awaited<T[P]>>; }>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a Promise that is resolved with an array of results when all
|
|
||||||
* of the provided Promises resolve or reject.
|
|
||||||
* @param values An array of Promises.
|
|
||||||
* @returns A new Promise.
|
|
||||||
*/
|
|
||||||
allSettled<T>(values: Iterable<T | PromiseLike<T>>): Promise<PromiseSettledResult<Awaited<T>>[]>;
|
|
||||||
}
|
|
||||||
@ -1,99 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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.bigint" />
|
|
||||||
|
|
||||||
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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, expectedValue: bigint, replacementValue: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: BigInt64Array<ArrayBufferLike>, index: number, value: bigint, 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 BigInt64Array.
|
|
||||||
* @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: BigInt64Array<ArrayBufferLike>, 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: BigInt64Array<ArrayBufferLike> | BigUint64Array<ArrayBufferLike>, index: number, value: bigint): bigint;
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="es2020.intl" />
|
|
||||||
/// <reference lib="es2020.symbol.wellknown" />
|
|
||||||
|
|
||||||
interface String {
|
|
||||||
/**
|
|
||||||
* Matches a string with a regular expression, and returns an iterable of matches
|
|
||||||
* containing the results of that search.
|
|
||||||
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
|
|
||||||
*/
|
|
||||||
matchAll(regexp: RegExp): RegExpStringIterator<RegExpExecArray>;
|
|
||||||
|
|
||||||
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
|
|
||||||
toLocaleLowerCase(locales?: Intl.LocalesArgument): string;
|
|
||||||
|
|
||||||
/** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
|
|
||||||
toLocaleUpperCase(locales?: Intl.LocalesArgument): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines whether two strings are equivalent in the current or specified locale.
|
|
||||||
* @param that String to compare to target string
|
|
||||||
* @param locales A locale string or array of locale strings 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. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.
|
|
||||||
* @param options An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.
|
|
||||||
*/
|
|
||||||
localeCompare(that: string, locales?: Intl.LocalesArgument, options?: Intl.CollatorOptions): number;
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="es2015.symbol" />
|
|
||||||
|
|
||||||
interface SymbolConstructor {
|
|
||||||
/**
|
|
||||||
* A regular expression method that matches the regular expression against a string. Called
|
|
||||||
* by the String.prototype.matchAll method.
|
|
||||||
*/
|
|
||||||
readonly matchAll: unique symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExpStringIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): RegExpStringIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExp {
|
|
||||||
/**
|
|
||||||
* Matches a string with this regular expression, and returns an iterable of matches
|
|
||||||
* containing the results of that search.
|
|
||||||
* @param string A string to search within.
|
|
||||||
*/
|
|
||||||
[Symbol.matchAll](str: string): RegExpStringIterator<RegExpMatchArray>;
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="es2021.promise" />
|
|
||||||
/// <reference lib="es2021.string" />
|
|
||||||
/// <reference lib="es2021.weakref" />
|
|
||||||
/// <reference lib="es2021.intl" />
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2021" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,166 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
fractionalSecond: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DateTimeFormatOptions {
|
|
||||||
formatMatcher?: "basic" | "best fit" | "best fit" | undefined;
|
|
||||||
dateStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
||||||
timeStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
||||||
dayPeriod?: "narrow" | "short" | "long" | undefined;
|
|
||||||
fractionalSecondDigits?: 1 | 2 | 3 | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DateTimeRangeFormatPart extends DateTimeFormatPart {
|
|
||||||
source: "startRange" | "endRange" | "shared";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DateTimeFormat {
|
|
||||||
formatRange(startDate: Date | number | bigint, endDate: Date | number | bigint): string;
|
|
||||||
formatRangeToParts(startDate: Date | number | bigint, endDate: Date | number | bigint): DateTimeRangeFormatPart[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ResolvedDateTimeFormatOptions {
|
|
||||||
formatMatcher?: "basic" | "best fit" | "best fit";
|
|
||||||
dateStyle?: "full" | "long" | "medium" | "short";
|
|
||||||
timeStyle?: "full" | "long" | "medium" | "short";
|
|
||||||
hourCycle?: "h11" | "h12" | "h23" | "h24";
|
|
||||||
dayPeriod?: "narrow" | "short" | "long";
|
|
||||||
fractionalSecondDigits?: 1 | 2 | 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The locale matching algorithm to use.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
||||||
*/
|
|
||||||
type ListFormatLocaleMatcher = "lookup" | "best fit";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The format of output message.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
||||||
*/
|
|
||||||
type ListFormatType = "conjunction" | "disjunction" | "unit";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The length of the formatted message.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
||||||
*/
|
|
||||||
type ListFormatStyle = "long" | "short" | "narrow";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* An object with some or all properties of the `Intl.ListFormat` constructor `options` parameter.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters).
|
|
||||||
*/
|
|
||||||
interface ListFormatOptions {
|
|
||||||
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
||||||
localeMatcher?: ListFormatLocaleMatcher | undefined;
|
|
||||||
/** The format of output message. */
|
|
||||||
type?: ListFormatType | undefined;
|
|
||||||
/** The length of the internationalized message. */
|
|
||||||
style?: ListFormatStyle | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ResolvedListFormatOptions {
|
|
||||||
locale: string;
|
|
||||||
style: ListFormatStyle;
|
|
||||||
type: ListFormatType;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ListFormat {
|
|
||||||
/**
|
|
||||||
* Returns a string with a language-specific representation of the list.
|
|
||||||
*
|
|
||||||
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array).
|
|
||||||
*
|
|
||||||
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
||||||
*
|
|
||||||
* @returns {string} A language-specific formatted string representing the elements of the list.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/format).
|
|
||||||
*/
|
|
||||||
format(list: Iterable<string>): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an Array of objects representing the different components that can be used to format a list of values in a locale-aware fashion.
|
|
||||||
*
|
|
||||||
* @param list - An iterable object, such as an [Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), to be formatted according to a locale.
|
|
||||||
*
|
|
||||||
* @throws `TypeError` if `list` includes something other than the possible values.
|
|
||||||
*
|
|
||||||
* @returns {{ type: "element" | "literal", value: string; }[]} An Array of components which contains the formatted parts from the list.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/formatToParts).
|
|
||||||
*/
|
|
||||||
formatToParts(list: Iterable<string>): { type: "element" | "literal"; value: string; }[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a new object with properties reflecting the locale and style
|
|
||||||
* formatting options computed during the construction of the current
|
|
||||||
* `Intl.ListFormat` object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/resolvedOptions).
|
|
||||||
*/
|
|
||||||
resolvedOptions(): ResolvedListFormatOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
const ListFormat: {
|
|
||||||
prototype: ListFormat;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates [Intl.ListFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) objects that
|
|
||||||
* enable language-sensitive list formatting.
|
|
||||||
*
|
|
||||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
||||||
* For the general form and interpretation of the `locales` argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/ListFormat#parameters)
|
|
||||||
* with some or all options of `ListFormatOptions`.
|
|
||||||
*
|
|
||||||
* @returns [Intl.ListFormatOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat) object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat).
|
|
||||||
*/
|
|
||||||
new (locales?: LocalesArgument, options?: ListFormatOptions): ListFormat;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array containing those of the provided locales that are
|
|
||||||
* supported in list formatting without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
||||||
* For the general form and interpretation of the `locales` argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf#parameters).
|
|
||||||
* with some or all possible options.
|
|
||||||
*
|
|
||||||
* @returns An array of strings representing a subset of the given locale tags that are supported in list
|
|
||||||
* formatting without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/ListFormat/supportedLocalesOf).
|
|
||||||
*/
|
|
||||||
supportedLocalesOf(locales: LocalesArgument, options?: Pick<ListFormatOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 AggregateError extends Error {
|
|
||||||
errors: any[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AggregateErrorConstructor {
|
|
||||||
new (errors: Iterable<any>, message?: string): AggregateError;
|
|
||||||
(errors: Iterable<any>, message?: string): AggregateError;
|
|
||||||
readonly prototype: AggregateError;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare var AggregateError: AggregateErrorConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents the completion of an asynchronous operation
|
|
||||||
*/
|
|
||||||
interface PromiseConstructor {
|
|
||||||
/**
|
|
||||||
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
||||||
* @param values An array or iterable of Promises.
|
|
||||||
* @returns A new Promise.
|
|
||||||
*/
|
|
||||||
any<T extends readonly unknown[] | []>(values: T): Promise<Awaited<T[number]>>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The any function returns a promise that is fulfilled by the first given promise to be fulfilled, or rejected with an AggregateError containing an array of rejection reasons if all of the given promises are rejected. It resolves all elements of the passed iterable to promises as it runs this algorithm.
|
|
||||||
* @param values An array or iterable of Promises.
|
|
||||||
* @returns A new Promise.
|
|
||||||
*/
|
|
||||||
any<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>>;
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
||||||
* @param searchValue A string to search for.
|
|
||||||
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
|
|
||||||
*/
|
|
||||||
replaceAll(searchValue: string | RegExp, replaceValue: string): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Replace all instances of a substring in a string, using a regular expression or search string.
|
|
||||||
* @param searchValue A string to search for.
|
|
||||||
* @param replacer A function that returns the replacement text.
|
|
||||||
*/
|
|
||||||
replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string;
|
|
||||||
}
|
|
||||||
@ -1,78 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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.wellknown" />
|
|
||||||
|
|
||||||
interface WeakRef<T extends WeakKey> {
|
|
||||||
readonly [Symbol.toStringTag]: "WeakRef";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the WeakRef instance's target value, or undefined if the target value has been
|
|
||||||
* reclaimed.
|
|
||||||
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
||||||
*/
|
|
||||||
deref(): T | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface WeakRefConstructor {
|
|
||||||
readonly prototype: WeakRef<any>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a WeakRef instance for the given target value.
|
|
||||||
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
||||||
* @param target The target value for the WeakRef instance.
|
|
||||||
*/
|
|
||||||
new <T extends WeakKey>(target: T): WeakRef<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare var WeakRef: WeakRefConstructor;
|
|
||||||
|
|
||||||
interface FinalizationRegistry<T> {
|
|
||||||
readonly [Symbol.toStringTag]: "FinalizationRegistry";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a value with the registry.
|
|
||||||
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
||||||
* @param target The target value to register.
|
|
||||||
* @param heldValue The value to pass to the finalizer for this value. This cannot be the
|
|
||||||
* target value.
|
|
||||||
* @param unregisterToken The token to pass to the unregister method to unregister the target
|
|
||||||
* value. If not provided, the target cannot be unregistered.
|
|
||||||
*/
|
|
||||||
register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Unregisters a value from the registry.
|
|
||||||
* In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
|
|
||||||
* @param unregisterToken The token that was used as the unregisterToken argument when calling
|
|
||||||
* register to register the target value.
|
|
||||||
*/
|
|
||||||
unregister(unregisterToken: WeakKey): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface FinalizationRegistryConstructor {
|
|
||||||
readonly prototype: FinalizationRegistry<any>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a finalization registry with an associated cleanup callback
|
|
||||||
* @param cleanupCallback The callback to call after a value in the registry has been reclaimed.
|
|
||||||
*/
|
|
||||||
new <T>(cleanupCallback: (heldValue: T) => void): FinalizationRegistry<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
declare var FinalizationRegistry: FinalizationRegistryConstructor;
|
|
||||||
@ -1,121 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): T | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadonlyArray<T> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): T | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): bigint | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): bigint | undefined;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2021" />
|
|
||||||
/// <reference lib="es2022.array" />
|
|
||||||
/// <reference lib="es2022.error" />
|
|
||||||
/// <reference lib="es2022.intl" />
|
|
||||||
/// <reference lib="es2022.object" />
|
|
||||||
/// <reference lib="es2022.regexp" />
|
|
||||||
/// <reference lib="es2022.string" />
|
|
||||||
@ -1,75 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2021.promise" />
|
|
||||||
|
|
||||||
interface ErrorOptions {
|
|
||||||
cause?: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Error {
|
|
||||||
cause?: unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): Error;
|
|
||||||
(message?: string, options?: ErrorOptions): Error;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface EvalErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): EvalError;
|
|
||||||
(message?: string, options?: ErrorOptions): EvalError;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RangeErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): RangeError;
|
|
||||||
(message?: string, options?: ErrorOptions): RangeError;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReferenceErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): ReferenceError;
|
|
||||||
(message?: string, options?: ErrorOptions): ReferenceError;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SyntaxErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): SyntaxError;
|
|
||||||
(message?: string, options?: ErrorOptions): SyntaxError;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface TypeErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): TypeError;
|
|
||||||
(message?: string, options?: ErrorOptions): TypeError;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface URIErrorConstructor {
|
|
||||||
new (message?: string, options?: ErrorOptions): URIError;
|
|
||||||
(message?: string, options?: ErrorOptions): URIError;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AggregateErrorConstructor {
|
|
||||||
new (
|
|
||||||
errors: Iterable<any>,
|
|
||||||
message?: string,
|
|
||||||
options?: ErrorOptions,
|
|
||||||
): AggregateError;
|
|
||||||
(
|
|
||||||
errors: Iterable<any>,
|
|
||||||
message?: string,
|
|
||||||
options?: ErrorOptions,
|
|
||||||
): AggregateError;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2022" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,145 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* An object with some or all properties of the `Intl.Segmenter` constructor `options` parameter.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
|
||||||
*/
|
|
||||||
interface SegmenterOptions {
|
|
||||||
/** The locale matching algorithm to use. For information about this option, see [Intl page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_negotiation). */
|
|
||||||
localeMatcher?: "best fit" | "lookup" | undefined;
|
|
||||||
/** The type of input to be split */
|
|
||||||
granularity?: "grapheme" | "word" | "sentence" | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)
|
|
||||||
*/
|
|
||||||
interface Segmenter {
|
|
||||||
/**
|
|
||||||
* Returns `Segments` object containing the segments of the input string, using the segmenter's locale and granularity.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment)
|
|
||||||
*
|
|
||||||
* @param input - The text to be segmented as a `string`.
|
|
||||||
*
|
|
||||||
* @returns A new iterable Segments object containing the segments of the input string, using the segmenter's locale and granularity.
|
|
||||||
*/
|
|
||||||
segment(input: string): Segments;
|
|
||||||
/**
|
|
||||||
* The `resolvedOptions()` method of `Intl.Segmenter` instances returns a new object with properties reflecting the options computed during initialization of this `Segmenter` object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/resolvedOptions)
|
|
||||||
*/
|
|
||||||
resolvedOptions(): ResolvedSegmenterOptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ResolvedSegmenterOptions {
|
|
||||||
locale: string;
|
|
||||||
granularity: "grapheme" | "word" | "sentence";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SegmentIterator<T> extends IteratorObject<T, BuiltinIteratorReturn, unknown> {
|
|
||||||
[Symbol.iterator](): SegmentIterator<T>;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A `Segments` object is an iterable collection of the segments of a text string. It is returned by a call to the `segment()` method of an `Intl.Segmenter` object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments)
|
|
||||||
*/
|
|
||||||
interface Segments {
|
|
||||||
/**
|
|
||||||
* Returns an object describing the segment in the original string that includes the code unit at a specified index.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/segment/Segments/containing)
|
|
||||||
*
|
|
||||||
* @param codeUnitIndex - A number specifying the index of the code unit in the original input string. If the value is omitted, it defaults to `0`.
|
|
||||||
*/
|
|
||||||
containing(codeUnitIndex?: number): SegmentData | undefined;
|
|
||||||
|
|
||||||
/** Returns an iterator to iterate over the segments. */
|
|
||||||
[Symbol.iterator](): SegmentIterator<SegmentData>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SegmentData {
|
|
||||||
/** A string containing the segment extracted from the original input string. */
|
|
||||||
segment: string;
|
|
||||||
/** The code unit index in the original input string at which the segment begins. */
|
|
||||||
index: number;
|
|
||||||
/** The complete input string that was segmented. */
|
|
||||||
input: string;
|
|
||||||
/**
|
|
||||||
* A boolean value only if granularity is "word"; otherwise, undefined.
|
|
||||||
* If granularity is "word", then isWordLike is true when the segment is word-like (i.e., consists of letters/numbers/ideographs/etc.); otherwise, false.
|
|
||||||
*/
|
|
||||||
isWordLike?: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The `Intl.Segmenter` object enables locale-sensitive text segmentation, enabling you to get meaningful items (graphemes, words or sentences) from a string.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter)
|
|
||||||
*/
|
|
||||||
const Segmenter: {
|
|
||||||
prototype: Segmenter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new `Intl.Segmenter` object.
|
|
||||||
*
|
|
||||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
||||||
* For the general form and interpretation of the `locales` argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options - An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/Segmenter#parameters)
|
|
||||||
* with some or all options of `SegmenterOptions`.
|
|
||||||
*
|
|
||||||
* @returns [Intl.Segmenter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segments) object.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter).
|
|
||||||
*/
|
|
||||||
new (locales?: LocalesArgument, options?: SegmenterOptions): Segmenter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
|
|
||||||
*
|
|
||||||
* @param locales - A string with a [BCP 47 language tag](http://tools.ietf.org/html/rfc5646), or an array of such strings.
|
|
||||||
* For the general form and interpretation of the `locales` argument,
|
|
||||||
* see the [`Intl` page](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl#Locale_identification_and_negotiation).
|
|
||||||
*
|
|
||||||
* @param options An [object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf#parameters).
|
|
||||||
* with some or all possible options.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Segmenter/supportedLocalesOf)
|
|
||||||
*/
|
|
||||||
supportedLocalesOf(locales: LocalesArgument, options?: Pick<SegmenterOptions, "localeMatcher">): UnicodeBCP47LocaleIdentifier[];
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a sorted array of the supported collation, calendar, currency, numbering system, timezones, and units by the implementation.
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf)
|
|
||||||
*
|
|
||||||
* @param key A string indicating the category of values to return.
|
|
||||||
* @returns A sorted array of the supported values.
|
|
||||||
*/
|
|
||||||
function supportedValuesOf(key: "calendar" | "collation" | "currency" | "numberingSystem" | "timeZone" | "unit"): string[];
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* Determines whether an object has a property with the specified name.
|
|
||||||
* @param o An object.
|
|
||||||
* @param v A property name.
|
|
||||||
*/
|
|
||||||
hasOwn(o: object, v: PropertyKey): boolean;
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
indices?: RegExpIndicesArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExpExecArray {
|
|
||||||
indices?: RegExpIndicesArray;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExpIndicesArray extends Array<[number, number]> {
|
|
||||||
groups?: {
|
|
||||||
[key: string]: [number, number];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RegExp {
|
|
||||||
/**
|
|
||||||
* Returns a Boolean value indicating the state of the hasIndices flag (d) used with a regular expression.
|
|
||||||
* Default is false. Read-only.
|
|
||||||
*/
|
|
||||||
readonly hasIndices: boolean;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* Returns a new String consisting of the single UTF-16 code unit located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): string | undefined;
|
|
||||||
}
|
|
||||||
@ -1,924 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends T>(predicate: (value: T, index: number, array: T[]) => value is S, thisArg?: any): S | undefined;
|
|
||||||
findLast(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): T | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(predicate: (value: T, index: number, array: T[]) => unknown, thisArg?: any): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a copy of an array with its elements reversed.
|
|
||||||
*/
|
|
||||||
toReversed(): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a copy of an array with its elements sorted.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
|
|
||||||
* ```ts
|
|
||||||
* [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: T, b: T) => number): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an array and removes elements and, if necessary, inserts new elements in their place. Returns the copied array.
|
|
||||||
* @param start The zero-based location in the array from which to start removing elements.
|
|
||||||
* @param deleteCount The number of elements to remove.
|
|
||||||
* @param items Elements to insert into the copied array in place of the deleted elements.
|
|
||||||
* @returns The copied array.
|
|
||||||
*/
|
|
||||||
toSpliced(start: number, deleteCount: number, ...items: T[]): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an array and removes elements while returning the remaining elements.
|
|
||||||
* @param start The zero-based location in the array from which to start removing elements.
|
|
||||||
* @param deleteCount The number of elements to remove.
|
|
||||||
* @returns A copy of the original array with the remaining elements.
|
|
||||||
*/
|
|
||||||
toSpliced(start: number, deleteCount?: number): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an array, then overwrites the value at the provided index with the
|
|
||||||
* given value. If the index is negative, then it replaces from the end
|
|
||||||
* of the array.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to write into the copied array.
|
|
||||||
* @returns The copied array with the updated value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: T): T[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadonlyArray<T> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends T>(
|
|
||||||
predicate: (value: T, index: number, array: readonly T[]) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (value: T, index: number, array: readonly T[]) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): T | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (value: T, index: number, array: readonly T[]) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copied array with all of its elements reversed.
|
|
||||||
*/
|
|
||||||
toReversed(): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending, UTF-16 code unit order.
|
|
||||||
* ```ts
|
|
||||||
* [11, 2, 22, 1].toSorted((a, b) => a - b) // [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: T, b: T) => number): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an array and removes elements while, if necessary, inserting new elements in their place, returning the remaining elements.
|
|
||||||
* @param start The zero-based location in the array from which to start removing elements.
|
|
||||||
* @param deleteCount The number of elements to remove.
|
|
||||||
* @param items Elements to insert into the copied array in place of the deleted elements.
|
|
||||||
* @returns A copy of the original array with the remaining elements.
|
|
||||||
*/
|
|
||||||
toSpliced(start: number, deleteCount: number, ...items: T[]): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an array and removes elements while returning the remaining elements.
|
|
||||||
* @param start The zero-based location in the array from which to start removing elements.
|
|
||||||
* @param deleteCount The number of elements to remove.
|
|
||||||
* @returns A copy of the original array with the remaining elements.
|
|
||||||
*/
|
|
||||||
toSpliced(start: number, deleteCount?: number): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies an array, then overwrites the value at the provided index with the
|
|
||||||
* given value. If the index is negative, then it replaces from the end
|
|
||||||
* of the array
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: T): T[];
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Int8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Int8Array.from([11, 2, 22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Int8Array(4) [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Int8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Int8Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Uint8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Uint8Array.from([11, 2, 22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Uint8Array(4) [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Uint8Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Uint8Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint8ClampedArray<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Uint8ClampedArray.from([11, 2, 22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Uint8ClampedArray(4) [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Uint8ClampedArray<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Int16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Int16Array.from([11, 2, -22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Int16Array(4) [-22, 1, 2, 11]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Int16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Int16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint16Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Uint16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Uint16Array.from([11, 2, 22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Uint16Array(4) [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Uint16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Uint16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Int32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (value: number, index: number, array: this) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Int32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Int32Array.from([11, 2, -22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Int32Array(4) [-22, 1, 2, 11]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Int32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Int32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Uint32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Uint32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Uint32Array.from([11, 2, 22, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Uint32Array(4) [1, 2, 11, 22]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Uint32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Uint32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float32Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Float32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Float32Array.from([11.25, 2, -22.5, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Float32Array(4) [-22.5, 1, 2, 11.5]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Float32Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Float32Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Float64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Float64Array.from([11.25, 2, -22.5, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Float64Array(4) [-22.5, 1, 2, 11.5]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Float64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Float64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BigInt64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends bigint>(
|
|
||||||
predicate: (
|
|
||||||
value: bigint,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: bigint,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): bigint | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: bigint,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = BigInt64Array.from([11n, 2n, -22n, 1n]);
|
|
||||||
* myNums.toSorted((a, b) => Number(a - b)) // BigInt64Array(4) [-22n, 1n, 2n, 11n]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: bigint, b: bigint) => number): BigInt64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given bigint at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: bigint): BigInt64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface BigUint64Array<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends bigint>(
|
|
||||||
predicate: (
|
|
||||||
value: bigint,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: bigint,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): bigint | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: bigint,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = BigUint64Array.from([11n, 2n, 22n, 1n]);
|
|
||||||
* myNums.toSorted((a, b) => Number(a - b)) // BigUint64Array(4) [1n, 2n, 11n, 22n]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: bigint, b: bigint) => number): BigUint64Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given bigint at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: bigint): BigUint64Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 WeakKeyTypes {
|
|
||||||
symbol: symbol;
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2022" />
|
|
||||||
/// <reference lib="es2023.array" />
|
|
||||||
/// <reference lib="es2023.collection" />
|
|
||||||
/// <reference lib="es2023.intl" />
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2023" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 NumberFormatOptionsUseGroupingRegistry {
|
|
||||||
min2: never;
|
|
||||||
auto: never;
|
|
||||||
always: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormatOptionsSignDisplayRegistry {
|
|
||||||
negative: never;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberFormatOptions {
|
|
||||||
roundingPriority?: "auto" | "morePrecision" | "lessPrecision" | undefined;
|
|
||||||
roundingIncrement?: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000 | undefined;
|
|
||||||
roundingMode?: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven" | undefined;
|
|
||||||
trailingZeroDisplay?: "auto" | "stripIfInteger" | undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ResolvedNumberFormatOptions {
|
|
||||||
roundingPriority: "auto" | "morePrecision" | "lessPrecision";
|
|
||||||
roundingMode: "ceil" | "floor" | "expand" | "trunc" | "halfCeil" | "halfFloor" | "halfExpand" | "halfTrunc" | "halfEven";
|
|
||||||
roundingIncrement: 1 | 2 | 5 | 10 | 20 | 25 | 50 | 100 | 200 | 250 | 500 | 1000 | 2000 | 2500 | 5000;
|
|
||||||
trailingZeroDisplay: "auto" | "stripIfInteger";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface NumberRangeFormatPart extends NumberFormatPart {
|
|
||||||
source: "startRange" | "endRange" | "shared";
|
|
||||||
}
|
|
||||||
|
|
||||||
type StringNumericLiteral = `${number}` | "Infinity" | "-Infinity" | "+Infinity";
|
|
||||||
|
|
||||||
interface NumberFormat {
|
|
||||||
format(value: number | bigint | StringNumericLiteral): string;
|
|
||||||
formatToParts(value: number | bigint | StringNumericLiteral): NumberFormatPart[];
|
|
||||||
formatRange(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): string;
|
|
||||||
formatRangeToParts(start: number | bigint | StringNumericLiteral, end: number | bigint | StringNumericLiteral): NumberRangeFormatPart[];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,65 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 ArrayBuffer {
|
|
||||||
/**
|
|
||||||
* If this ArrayBuffer is resizable, returns the maximum byte length given during construction; returns the byte length if not.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/maxByteLength)
|
|
||||||
*/
|
|
||||||
get maxByteLength(): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if this ArrayBuffer can be resized.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resizable)
|
|
||||||
*/
|
|
||||||
get resizable(): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resizes the ArrayBuffer to the specified size (in bytes).
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/resize)
|
|
||||||
*/
|
|
||||||
resize(newByteLength?: number): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a boolean indicating whether or not this buffer has been detached (transferred).
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/detached)
|
|
||||||
*/
|
|
||||||
get detached(): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new ArrayBuffer with the same byte content as this buffer, then detaches this buffer.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transfer)
|
|
||||||
*/
|
|
||||||
transfer(newByteLength?: number): ArrayBuffer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new non-resizable ArrayBuffer with the same byte content as this buffer, then detaches this buffer.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer/transferToFixedLength)
|
|
||||||
*/
|
|
||||||
transferToFixedLength(newByteLength?: number): ArrayBuffer;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ArrayBufferConstructor {
|
|
||||||
new (byteLength: number, options?: { maxByteLength?: number; }): ArrayBuffer;
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 MapConstructor {
|
|
||||||
/**
|
|
||||||
* Groups members of an iterable according to the return value of the passed callback.
|
|
||||||
* @param items An iterable.
|
|
||||||
* @param keySelector A callback which will be invoked for each item in items.
|
|
||||||
*/
|
|
||||||
groupBy<K, T>(
|
|
||||||
items: Iterable<T>,
|
|
||||||
keySelector: (item: T, index: number) => K,
|
|
||||||
): Map<K, T[]>;
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2023" />
|
|
||||||
/// <reference lib="es2024.arraybuffer" />
|
|
||||||
/// <reference lib="es2024.collection" />
|
|
||||||
/// <reference lib="es2024.object" />
|
|
||||||
/// <reference lib="es2024.promise" />
|
|
||||||
/// <reference lib="es2024.regexp" />
|
|
||||||
/// <reference lib="es2024.sharedmemory" />
|
|
||||||
/// <reference lib="es2024.string" />
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2024" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* Groups members of an iterable according to the return value of the passed callback.
|
|
||||||
* @param items An iterable.
|
|
||||||
* @param keySelector A callback which will be invoked for each item in items.
|
|
||||||
*/
|
|
||||||
groupBy<K extends PropertyKey, T>(
|
|
||||||
items: Iterable<T>,
|
|
||||||
keySelector: (item: T, index: number) => K,
|
|
||||||
): Partial<Record<K, T[]>>;
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 PromiseWithResolvers<T> {
|
|
||||||
promise: Promise<T>;
|
|
||||||
resolve: (value: T | PromiseLike<T>) => void;
|
|
||||||
reject: (reason?: any) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface PromiseConstructor {
|
|
||||||
/**
|
|
||||||
* Creates a new Promise and returns it in an object, along with its resolve and reject functions.
|
|
||||||
* @returns An object with the properties `promise`, `resolve`, and `reject`.
|
|
||||||
*
|
|
||||||
* ```ts
|
|
||||||
* const { promise, resolve, reject } = Promise.withResolvers<T>();
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
withResolvers<T>(): PromiseWithResolvers<T>;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 RegExp {
|
|
||||||
/**
|
|
||||||
* Returns a Boolean value indicating the state of the unicodeSets flag (v) used with a regular expression.
|
|
||||||
* Default is false. Read-only.
|
|
||||||
*/
|
|
||||||
readonly unicodeSets: boolean;
|
|
||||||
}
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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.bigint" />
|
|
||||||
|
|
||||||
interface Atomics {
|
|
||||||
/**
|
|
||||||
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
||||||
* Waits asynchronously on a shared memory location and returns a Promise
|
|
||||||
* @param typedArray A shared Int32Array or BigInt64Array.
|
|
||||||
* @param index The position in the typedArray to wait on.
|
|
||||||
* @param value The expected value to test.
|
|
||||||
* @param [timeout] The expected value to test.
|
|
||||||
*/
|
|
||||||
waitAsync(typedArray: Int32Array, index: number, value: number, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A non-blocking, asynchronous version of wait which is usable on the main thread.
|
|
||||||
* Waits asynchronously on a shared memory location and returns a Promise
|
|
||||||
* @param typedArray A shared Int32Array or BigInt64Array.
|
|
||||||
* @param index The position in the typedArray to wait on.
|
|
||||||
* @param value The expected value to test.
|
|
||||||
* @param [timeout] The expected value to test.
|
|
||||||
*/
|
|
||||||
waitAsync(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): { async: false; value: "not-equal" | "timed-out"; } | { async: true; value: Promise<"ok" | "timed-out">; };
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SharedArrayBuffer {
|
|
||||||
/**
|
|
||||||
* Returns true if this SharedArrayBuffer can be grown.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/growable)
|
|
||||||
*/
|
|
||||||
get growable(): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If this SharedArrayBuffer is growable, returns the maximum byte length given during construction; returns the byte length if not.
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/maxByteLength)
|
|
||||||
*/
|
|
||||||
get maxByteLength(): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Grows the SharedArrayBuffer to the specified size (in bytes).
|
|
||||||
*
|
|
||||||
* [MDN](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/grow)
|
|
||||||
*/
|
|
||||||
grow(newByteLength?: number): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SharedArrayBufferConstructor {
|
|
||||||
new (byteLength: number, options?: { maxByteLength?: number; }): SharedArrayBuffer;
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* Returns true if all leading surrogates and trailing surrogates appear paired and in order.
|
|
||||||
*/
|
|
||||||
isWellFormed(): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a string where all lone or out-of-order surrogates have been replaced by the Unicode replacement character (U+FFFD).
|
|
||||||
*/
|
|
||||||
toWellFormed(): string;
|
|
||||||
}
|
|
||||||
4601
kitcom/internal/tsgo/bundled/libs/lib.es5.d.ts
vendored
4601
kitcom/internal/tsgo/bundled/libs/lib.es5.d.ts
vendored
File diff suppressed because it is too large
Load Diff
23
kitcom/internal/tsgo/bundled/libs/lib.es6.d.ts
vendored
23
kitcom/internal/tsgo/bundled/libs/lib.es6.d.ts
vendored
@ -1,23 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="dom" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 ArrayConstructor {
|
|
||||||
/**
|
|
||||||
* Creates an array from an async iterator or iterable object.
|
|
||||||
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
|
|
||||||
*/
|
|
||||||
fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an async iterator or iterable object.
|
|
||||||
*
|
|
||||||
* @param iterableOrArrayLike An async iterator or array-like object to convert to an array.
|
|
||||||
* @param mapfn A mapping function to call on every element of itarableOrArrayLike.
|
|
||||||
* Each return value is awaited before being added to result array.
|
|
||||||
* @param thisArg Value of 'this' used when executing mapfn.
|
|
||||||
*/
|
|
||||||
fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
|
|
||||||
}
|
|
||||||
@ -1,96 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2024.collection" />
|
|
||||||
|
|
||||||
interface ReadonlySetLike<T> {
|
|
||||||
/**
|
|
||||||
* Despite its name, returns an iterator of the values in the set-like.
|
|
||||||
*/
|
|
||||||
keys(): Iterator<T>;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether an element with the specified value exists in the set-like or not.
|
|
||||||
*/
|
|
||||||
has(value: T): boolean;
|
|
||||||
/**
|
|
||||||
* @returns the number of (unique) elements in the set-like.
|
|
||||||
*/
|
|
||||||
readonly size: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Set<T> {
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
||||||
*/
|
|
||||||
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
||||||
*/
|
|
||||||
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
||||||
*/
|
|
||||||
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
|
|
||||||
*/
|
|
||||||
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
||||||
*/
|
|
||||||
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
||||||
*/
|
|
||||||
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
||||||
*/
|
|
||||||
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface ReadonlySet<T> {
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements in this Set and also all the elements in the argument.
|
|
||||||
*/
|
|
||||||
union<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements which are both in this Set and in the argument.
|
|
||||||
*/
|
|
||||||
intersection<U>(other: ReadonlySetLike<U>): Set<T & U>;
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements in this Set which are not also in the argument.
|
|
||||||
*/
|
|
||||||
difference<U>(other: ReadonlySetLike<U>): Set<T>;
|
|
||||||
/**
|
|
||||||
* @returns a new Set containing all the elements which are in either this Set or in the argument, but not in both.
|
|
||||||
*/
|
|
||||||
symmetricDifference<U>(other: ReadonlySetLike<U>): Set<T | U>;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether all the elements in this Set are also in the argument.
|
|
||||||
*/
|
|
||||||
isSubsetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether all the elements in the argument are also in this Set.
|
|
||||||
*/
|
|
||||||
isSupersetOf(other: ReadonlySetLike<unknown>): boolean;
|
|
||||||
/**
|
|
||||||
* @returns a boolean indicating whether this Set has no elements in common with the argument.
|
|
||||||
*/
|
|
||||||
isDisjointFrom(other: ReadonlySetLike<unknown>): boolean;
|
|
||||||
}
|
|
||||||
@ -1,29 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="es2024" />
|
|
||||||
/// <reference lib="esnext.intl" />
|
|
||||||
/// <reference lib="esnext.decorators" />
|
|
||||||
/// <reference lib="esnext.disposable" />
|
|
||||||
/// <reference lib="esnext.collection" />
|
|
||||||
/// <reference lib="esnext.array" />
|
|
||||||
/// <reference lib="esnext.iterator" />
|
|
||||||
/// <reference lib="esnext.promise" />
|
|
||||||
/// <reference lib="esnext.float16" />
|
|
||||||
/// <reference lib="esnext.error" />
|
|
||||||
/// <reference lib="esnext.sharedmemory" />
|
|
||||||
@ -1,28 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="decorators" />
|
|
||||||
|
|
||||||
interface SymbolConstructor {
|
|
||||||
readonly metadata: unique symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Function {
|
|
||||||
[Symbol.metadata]: DecoratorMetadata | null;
|
|
||||||
}
|
|
||||||
@ -1,193 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
/// <reference lib="es2018.asynciterable" />
|
|
||||||
|
|
||||||
interface SymbolConstructor {
|
|
||||||
/**
|
|
||||||
* A method that is used to release resources held by an object. Called by the semantics of the `using` statement.
|
|
||||||
*/
|
|
||||||
readonly dispose: unique symbol;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A method that is used to asynchronously release resources held by an object. Called by the semantics of the `await using` statement.
|
|
||||||
*/
|
|
||||||
readonly asyncDispose: unique symbol;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Disposable {
|
|
||||||
[Symbol.dispose](): void;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AsyncDisposable {
|
|
||||||
[Symbol.asyncDispose](): PromiseLike<void>;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SuppressedError extends Error {
|
|
||||||
error: any;
|
|
||||||
suppressed: any;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface SuppressedErrorConstructor {
|
|
||||||
new (error: any, suppressed: any, message?: string): SuppressedError;
|
|
||||||
(error: any, suppressed: any, message?: string): SuppressedError;
|
|
||||||
readonly prototype: SuppressedError;
|
|
||||||
}
|
|
||||||
declare var SuppressedError: SuppressedErrorConstructor;
|
|
||||||
|
|
||||||
interface DisposableStack {
|
|
||||||
/**
|
|
||||||
* Returns a value indicating whether this stack has been disposed.
|
|
||||||
*/
|
|
||||||
readonly disposed: boolean;
|
|
||||||
/**
|
|
||||||
* Disposes each resource in the stack in the reverse order that they were added.
|
|
||||||
*/
|
|
||||||
dispose(): void;
|
|
||||||
/**
|
|
||||||
* Adds a disposable resource to the stack, returning the resource.
|
|
||||||
* @param value The resource to add. `null` and `undefined` will not be added, but will be returned.
|
|
||||||
* @returns The provided {@link value}.
|
|
||||||
*/
|
|
||||||
use<T extends Disposable | null | undefined>(value: T): T;
|
|
||||||
/**
|
|
||||||
* Adds a value and associated disposal callback as a resource to the stack.
|
|
||||||
* @param value The value to add.
|
|
||||||
* @param onDispose The callback to use in place of a `[Symbol.dispose]()` method. Will be invoked with `value`
|
|
||||||
* as the first parameter.
|
|
||||||
* @returns The provided {@link value}.
|
|
||||||
*/
|
|
||||||
adopt<T>(value: T, onDispose: (value: T) => void): T;
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked when the stack is disposed.
|
|
||||||
*/
|
|
||||||
defer(onDispose: () => void): void;
|
|
||||||
/**
|
|
||||||
* Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed.
|
|
||||||
* @example
|
|
||||||
* ```ts
|
|
||||||
* class C {
|
|
||||||
* #res1: Disposable;
|
|
||||||
* #res2: Disposable;
|
|
||||||
* #disposables: DisposableStack;
|
|
||||||
* constructor() {
|
|
||||||
* // stack will be disposed when exiting constructor for any reason
|
|
||||||
* using stack = new DisposableStack();
|
|
||||||
*
|
|
||||||
* // get first resource
|
|
||||||
* this.#res1 = stack.use(getResource1());
|
|
||||||
*
|
|
||||||
* // get second resource. If this fails, both `stack` and `#res1` will be disposed.
|
|
||||||
* this.#res2 = stack.use(getResource2());
|
|
||||||
*
|
|
||||||
* // all operations succeeded, move resources out of `stack` so that they aren't disposed
|
|
||||||
* // when constructor exits
|
|
||||||
* this.#disposables = stack.move();
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* [Symbol.dispose]() {
|
|
||||||
* this.#disposables.dispose();
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
move(): DisposableStack;
|
|
||||||
[Symbol.dispose](): void;
|
|
||||||
readonly [Symbol.toStringTag]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DisposableStackConstructor {
|
|
||||||
new (): DisposableStack;
|
|
||||||
readonly prototype: DisposableStack;
|
|
||||||
}
|
|
||||||
declare var DisposableStack: DisposableStackConstructor;
|
|
||||||
|
|
||||||
interface AsyncDisposableStack {
|
|
||||||
/**
|
|
||||||
* Returns a value indicating whether this stack has been disposed.
|
|
||||||
*/
|
|
||||||
readonly disposed: boolean;
|
|
||||||
/**
|
|
||||||
* Disposes each resource in the stack in the reverse order that they were added.
|
|
||||||
*/
|
|
||||||
disposeAsync(): Promise<void>;
|
|
||||||
/**
|
|
||||||
* Adds a disposable resource to the stack, returning the resource.
|
|
||||||
* @param value The resource to add. `null` and `undefined` will not be added, but will be returned.
|
|
||||||
* @returns The provided {@link value}.
|
|
||||||
*/
|
|
||||||
use<T extends AsyncDisposable | Disposable | null | undefined>(value: T): T;
|
|
||||||
/**
|
|
||||||
* Adds a value and associated disposal callback as a resource to the stack.
|
|
||||||
* @param value The value to add.
|
|
||||||
* @param onDisposeAsync The callback to use in place of a `[Symbol.asyncDispose]()` method. Will be invoked with `value`
|
|
||||||
* as the first parameter.
|
|
||||||
* @returns The provided {@link value}.
|
|
||||||
*/
|
|
||||||
adopt<T>(value: T, onDisposeAsync: (value: T) => PromiseLike<void> | void): T;
|
|
||||||
/**
|
|
||||||
* Adds a callback to be invoked when the stack is disposed.
|
|
||||||
*/
|
|
||||||
defer(onDisposeAsync: () => PromiseLike<void> | void): void;
|
|
||||||
/**
|
|
||||||
* Move all resources out of this stack and into a new `DisposableStack`, and marks this stack as disposed.
|
|
||||||
* @example
|
|
||||||
* ```ts
|
|
||||||
* class C {
|
|
||||||
* #res1: Disposable;
|
|
||||||
* #res2: Disposable;
|
|
||||||
* #disposables: DisposableStack;
|
|
||||||
* constructor() {
|
|
||||||
* // stack will be disposed when exiting constructor for any reason
|
|
||||||
* using stack = new DisposableStack();
|
|
||||||
*
|
|
||||||
* // get first resource
|
|
||||||
* this.#res1 = stack.use(getResource1());
|
|
||||||
*
|
|
||||||
* // get second resource. If this fails, both `stack` and `#res1` will be disposed.
|
|
||||||
* this.#res2 = stack.use(getResource2());
|
|
||||||
*
|
|
||||||
* // all operations succeeded, move resources out of `stack` so that they aren't disposed
|
|
||||||
* // when constructor exits
|
|
||||||
* this.#disposables = stack.move();
|
|
||||||
* }
|
|
||||||
*
|
|
||||||
* [Symbol.dispose]() {
|
|
||||||
* this.#disposables.dispose();
|
|
||||||
* }
|
|
||||||
* }
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
move(): AsyncDisposableStack;
|
|
||||||
[Symbol.asyncDispose](): Promise<void>;
|
|
||||||
readonly [Symbol.toStringTag]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AsyncDisposableStackConstructor {
|
|
||||||
new (): AsyncDisposableStack;
|
|
||||||
readonly prototype: AsyncDisposableStack;
|
|
||||||
}
|
|
||||||
declare var AsyncDisposableStack: AsyncDisposableStackConstructor;
|
|
||||||
|
|
||||||
interface IteratorObject<T, TReturn, TNext> extends Disposable {
|
|
||||||
}
|
|
||||||
|
|
||||||
interface AsyncIteratorObject<T, TReturn, TNext> extends AsyncDisposable {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 ErrorConstructor {
|
|
||||||
/**
|
|
||||||
* Indicates whether the argument provided is a built-in Error instance or not.
|
|
||||||
*/
|
|
||||||
isError(error: unknown): error is Error;
|
|
||||||
}
|
|
||||||
@ -1,445 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A typed array of 16-bit float values. The contents are initialized to 0. If the requested number
|
|
||||||
* of bytes could not be allocated an exception is raised.
|
|
||||||
*/
|
|
||||||
interface Float16Array<TArrayBuffer extends ArrayBufferLike = ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* The size in bytes of each element in the array.
|
|
||||||
*/
|
|
||||||
readonly BYTES_PER_ELEMENT: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The ArrayBuffer instance referenced by the array.
|
|
||||||
*/
|
|
||||||
readonly buffer: TArrayBuffer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The length in bytes of the array.
|
|
||||||
*/
|
|
||||||
readonly byteLength: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The offset in bytes of the array.
|
|
||||||
*/
|
|
||||||
readonly byteOffset: number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the item located at the specified index.
|
|
||||||
* @param index The zero-based index of the desired code unit. A negative index will count back from the last item.
|
|
||||||
*/
|
|
||||||
at(index: number): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 a value
|
|
||||||
* which is coercible to the Boolean value 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: number, index: number, array: this) => unknown, 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: number, 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: number, index: number, array: this) => any, thisArg?: any): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: number, index: number, obj: this) => boolean, thisArg?: any): number | 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: number, index: number, obj: this) => boolean, thisArg?: any): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the value of the last element in the array where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLast calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found, findLast
|
|
||||||
* immediately returns that element value. Otherwise, findLast 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.
|
|
||||||
*/
|
|
||||||
findLast<S extends number>(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => value is S,
|
|
||||||
thisArg?: any,
|
|
||||||
): S | undefined;
|
|
||||||
findLast(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
thisArg?: any,
|
|
||||||
): number | undefined;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the index of the last element in the array where predicate is true, and -1
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate findLastIndex calls predicate once for each element of the array, in descending
|
|
||||||
* order, until it finds one where predicate returns true. If such an element is found,
|
|
||||||
* findLastIndex immediately returns that element index. Otherwise, findLastIndex 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.
|
|
||||||
*/
|
|
||||||
findLastIndex(
|
|
||||||
predicate: (
|
|
||||||
value: number,
|
|
||||||
index: number,
|
|
||||||
array: this,
|
|
||||||
) => unknown,
|
|
||||||
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: number, index: number, array: this) => 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: number, 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: number, 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;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: number, 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: number, index: number, array: this) => number, thisArg?: any): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
||||||
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: number, currentIndex: number, array: this) => 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: number, currentValue: number, currentIndex: number, array: this) => number): number;
|
|
||||||
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: this) => number, initialValue: number): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: number, currentIndex: number, array: this) => U, initialValue: U): U;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverses the elements in an 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<number>, 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. This is exclusive of the element at the index 'end'.
|
|
||||||
*/
|
|
||||||
slice(start?: number, end?: number): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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 a value
|
|
||||||
* which is coercible to the Boolean value 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: number, index: number, array: this) => unknown, thisArg?: any): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sorts an array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if first argument is less than second argument, zero if they're equal and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* [11,2,22,1].sort((a, b) => a - b)
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
sort(compareFn?: (a: number, b: number) => number): this;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a new Float16Array 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): Float16Array<TArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Converts a number to a string by using the current locale.
|
|
||||||
*/
|
|
||||||
toLocaleString(locales?: string | string[], options?: Intl.NumberFormatOptions): string;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and returns the copy with the elements in reverse order.
|
|
||||||
*/
|
|
||||||
toReversed(): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies and sorts the array.
|
|
||||||
* @param compareFn Function used to determine the order of the elements. It is expected to return
|
|
||||||
* a negative value if the first argument is less than the second argument, zero if they're equal, and a positive
|
|
||||||
* value otherwise. If omitted, the elements are sorted in ascending order.
|
|
||||||
* ```ts
|
|
||||||
* const myNums = Float16Array.from([11.25, 2, -22.5, 1]);
|
|
||||||
* myNums.toSorted((a, b) => a - b) // Float16Array(4) [-22.5, 1, 2, 11.5]
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
toSorted(compareFn?: (a: number, b: number) => number): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a string representation of an array.
|
|
||||||
*/
|
|
||||||
toString(): string;
|
|
||||||
|
|
||||||
/** Returns the primitive value of the specified object. */
|
|
||||||
valueOf(): this;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Copies the array and inserts the given number at the provided index.
|
|
||||||
* @param index The index of the value to overwrite. If the index is
|
|
||||||
* negative, then it replaces from the end of the array.
|
|
||||||
* @param value The value to insert into the copied array.
|
|
||||||
* @returns A copy of the original array with the inserted value.
|
|
||||||
*/
|
|
||||||
with(index: number, value: number): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
[index: number]: number;
|
|
||||||
|
|
||||||
[Symbol.iterator](): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an array of key, value pairs for every entry in the array
|
|
||||||
*/
|
|
||||||
entries(): ArrayIterator<[number, number]>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of keys in the array
|
|
||||||
*/
|
|
||||||
keys(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns an list of values in the array
|
|
||||||
*/
|
|
||||||
values(): ArrayIterator<number>;
|
|
||||||
|
|
||||||
readonly [Symbol.toStringTag]: "Float16Array";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Float16ArrayConstructor {
|
|
||||||
readonly prototype: Float16Array<ArrayBufferLike>;
|
|
||||||
new (length?: number): Float16Array<ArrayBuffer>;
|
|
||||||
new (array: ArrayLike<number> | Iterable<number>): Float16Array<ArrayBuffer>;
|
|
||||||
new <TArrayBuffer extends ArrayBufferLike = ArrayBuffer>(buffer: TArrayBuffer, byteOffset?: number, length?: number): Float16Array<TArrayBuffer>;
|
|
||||||
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float16Array<ArrayBuffer>;
|
|
||||||
new (array: ArrayLike<number> | ArrayBuffer): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 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: number[]): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param arrayLike An array-like object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(arrayLike: ArrayLike<number>): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param arrayLike An array-like 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>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => number, thisArg?: any): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements An iterable object to convert to an array.
|
|
||||||
*/
|
|
||||||
from(elements: Iterable<number>): Float16Array<ArrayBuffer>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an array from an array-like or iterable object.
|
|
||||||
* @param elements 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>(elements: Iterable<T>, mapfn?: (v: T, k: number) => number, thisArg?: any): Float16Array<ArrayBuffer>;
|
|
||||||
}
|
|
||||||
declare var Float16Array: Float16ArrayConstructor;
|
|
||||||
|
|
||||||
interface Math {
|
|
||||||
/**
|
|
||||||
* Returns the nearest half precision float representation of a number.
|
|
||||||
* @param x A numeric expression.
|
|
||||||
*/
|
|
||||||
f16round(x: number): number;
|
|
||||||
}
|
|
||||||
|
|
||||||
interface DataView<TArrayBuffer extends ArrayBufferLike> {
|
|
||||||
/**
|
|
||||||
* Gets the Float16 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.
|
|
||||||
*/
|
|
||||||
getFloat16(byteOffset: number, littleEndian?: boolean): number;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Stores an Float16 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.
|
|
||||||
*/
|
|
||||||
setFloat16(byteOffset: number, value: number, littleEndian?: boolean): void;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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="esnext" />
|
|
||||||
/// <reference lib="dom" />
|
|
||||||
/// <reference lib="webworker.importscripts" />
|
|
||||||
/// <reference lib="scripthost" />
|
|
||||||
/// <reference lib="dom.iterable" />
|
|
||||||
/// <reference lib="dom.asynciterable" />
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
// Empty
|
|
||||||
}
|
|
||||||
@ -1,148 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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" />
|
|
||||||
|
|
||||||
// NOTE: This is specified as what is essentially an unreachable module. All actual global declarations can be found
|
|
||||||
// in the `declare global` section, below. This is necessary as there is currently no way to declare an `abstract`
|
|
||||||
// member without declaring a `class`, but declaring `class Iterator<T>` globally would conflict with TypeScript's
|
|
||||||
// general purpose `Iterator<T>` interface.
|
|
||||||
export {};
|
|
||||||
|
|
||||||
// Abstract type that allows us to mark `next` as `abstract`
|
|
||||||
declare abstract class Iterator<T, TResult = undefined, TNext = unknown> { // eslint-disable-line @typescript-eslint/no-unsafe-declaration-merging
|
|
||||||
abstract next(value?: TNext): IteratorResult<T, TResult>;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Merge all members of `IteratorObject<T>` into `Iterator<T>`
|
|
||||||
interface Iterator<T, TResult, TNext> extends globalThis.IteratorObject<T, TResult, TNext> {}
|
|
||||||
|
|
||||||
// Capture the `Iterator` constructor in a type we can use in the `extends` clause of `IteratorConstructor`.
|
|
||||||
type IteratorObjectConstructor = typeof Iterator;
|
|
||||||
|
|
||||||
declare global {
|
|
||||||
// Global `IteratorObject<T, TReturn, TNext>` interface that can be augmented by polyfills
|
|
||||||
interface IteratorObject<T, TReturn, TNext> {
|
|
||||||
/**
|
|
||||||
* Returns this iterator.
|
|
||||||
*/
|
|
||||||
[Symbol.iterator](): IteratorObject<T, TReturn, TNext>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an iterator whose values are the result of applying the callback to the values from this iterator.
|
|
||||||
* @param callbackfn A function that accepts up to two arguments to be used to transform values from the underlying iterator.
|
|
||||||
*/
|
|
||||||
map<U>(callbackfn: (value: T, index: number) => U): IteratorObject<U, undefined, unknown>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
|
|
||||||
* @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
|
|
||||||
*/
|
|
||||||
filter<S extends T>(predicate: (value: T, index: number) => value is S): IteratorObject<S, undefined, unknown>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an iterator whose values are those from this iterator for which the provided predicate returns true.
|
|
||||||
* @param predicate A function that accepts up to two arguments to be used to test values from the underlying iterator.
|
|
||||||
*/
|
|
||||||
filter(predicate: (value: T, index: number) => unknown): IteratorObject<T, undefined, unknown>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an iterator whose values are the values from this iterator, stopping once the provided limit is reached.
|
|
||||||
* @param limit The maximum number of values to yield.
|
|
||||||
*/
|
|
||||||
take(limit: number): IteratorObject<T, undefined, unknown>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an iterator whose values are the values from this iterator after skipping the provided count.
|
|
||||||
* @param count The number of values to drop.
|
|
||||||
*/
|
|
||||||
drop(count: number): IteratorObject<T, undefined, unknown>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates an iterator whose values are the result of applying the callback to the values from this iterator and then flattening the resulting iterators or iterables.
|
|
||||||
* @param callback A function that accepts up to two arguments to be used to transform values from the underlying iterator into new iterators or iterables to be flattened into the result.
|
|
||||||
*/
|
|
||||||
flatMap<U>(callback: (value: T, index: number) => Iterator<U, unknown, undefined> | Iterable<U, unknown, undefined>): IteratorObject<U, undefined, unknown>;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls the specified callback function for all the elements in this iterator. 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 three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
|
|
||||||
* @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 a value from the iterator.
|
|
||||||
*/
|
|
||||||
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T): T;
|
|
||||||
reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number) => T, initialValue: T): T;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Calls the specified callback function for all the elements in this iterator. 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 three arguments. The reduce method calls the callbackfn function one time for each element in the iterator.
|
|
||||||
* @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 a value from the iterator.
|
|
||||||
*/
|
|
||||||
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number) => U, initialValue: U): U;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new array from the values yielded by this iterator.
|
|
||||||
*/
|
|
||||||
toArray(): T[];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Performs the specified action for each element in the iterator.
|
|
||||||
* @param callbackfn A function that accepts up to two arguments. forEach calls the callbackfn function one time for each element in the iterator.
|
|
||||||
*/
|
|
||||||
forEach(callbackfn: (value: T, index: number) => void): void;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines whether the specified callback function returns true for any element of this iterator.
|
|
||||||
* @param predicate A function that accepts up to two arguments. The some method calls
|
|
||||||
* the predicate function for each element in this iterator until the predicate returns a value
|
|
||||||
* true, or until the end of the iterator.
|
|
||||||
*/
|
|
||||||
some(predicate: (value: T, index: number) => unknown): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines whether all the members of this iterator satisfy the specified test.
|
|
||||||
* @param predicate A function that accepts up to two arguments. The every method calls
|
|
||||||
* the predicate function for each element in this iterator until the predicate returns
|
|
||||||
* false, or until the end of this iterator.
|
|
||||||
*/
|
|
||||||
every(predicate: (value: T, index: number) => unknown): boolean;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the value of the first element in this iterator where predicate is true, and undefined
|
|
||||||
* otherwise.
|
|
||||||
* @param predicate find calls predicate once for each element of this iterator, in
|
|
||||||
* 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.
|
|
||||||
*/
|
|
||||||
find<S extends T>(predicate: (value: T, index: number) => value is S): S | undefined;
|
|
||||||
find(predicate: (value: T, index: number) => unknown): T | undefined;
|
|
||||||
|
|
||||||
readonly [Symbol.toStringTag]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Global `IteratorConstructor` interface that can be augmented by polyfills
|
|
||||||
interface IteratorConstructor extends IteratorObjectConstructor {
|
|
||||||
/**
|
|
||||||
* Creates a native iterator from an iterator or iterable object.
|
|
||||||
* Returns its input if the input already inherits from the built-in Iterator class.
|
|
||||||
* @param value An iterator or iterable object to convert a native iterator.
|
|
||||||
*/
|
|
||||||
from<T>(value: Iterator<T, unknown, undefined> | Iterable<T, unknown, undefined>): IteratorObject<T, undefined, unknown>;
|
|
||||||
}
|
|
||||||
|
|
||||||
var Iterator: IteratorConstructor;
|
|
||||||
}
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 {
|
|
||||||
/**
|
|
||||||
* Takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result
|
|
||||||
* in a Promise.
|
|
||||||
*
|
|
||||||
* @param callbackFn A function that is called synchronously. It can do anything: either return
|
|
||||||
* a value, throw an error, or return a promise.
|
|
||||||
* @param args Additional arguments, that will be passed to the callback.
|
|
||||||
*
|
|
||||||
* @returns A Promise that is:
|
|
||||||
* - Already fulfilled, if the callback synchronously returns a value.
|
|
||||||
* - Already rejected, if the callback synchronously throws an error.
|
|
||||||
* - Asynchronously fulfilled or rejected, if the callback returns a promise.
|
|
||||||
*/
|
|
||||||
try<T, U extends unknown[]>(callbackFn: (...args: U) => T | PromiseLike<T>, ...args: U): Promise<Awaited<T>>;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
/*! *****************************************************************************
|
|
||||||
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 Atomics {
|
|
||||||
/**
|
|
||||||
* Performs a finite-time microwait by signaling to the operating system or
|
|
||||||
* CPU that the current executing code is in a spin-wait loop.
|
|
||||||
*/
|
|
||||||
pause(n?: number): void;
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user