Merge pull request #987 from Microsoft/es6Typings

ES6 typings
This commit is contained in:
Mohamed Hegazy
2014-12-01 17:32:09 -08:00
71 changed files with 5780 additions and 423 deletions
+2
View File
@@ -11,6 +11,7 @@ tests/cases/*/*/*.js.map
tests/cases/*/*/*/*.js.map
tests/cases/*/*/*/*/*.js.map
tests/cases/rwc/*
tests/cases/test262/*
tests/cases/perf/*
!tests/cases/webharness/compilerToString.js
test-args.txt
@@ -19,6 +20,7 @@ tests/baselines/local/*
tests/services/baselines/local/*
tests/baselines/prototyping/local/*
tests/baselines/rwc/*
tests/baselines/test262/*
tests/services/baselines/prototyping/local/*
tests/services/browser/typescriptServices.js
scripts/processDiagnosticMessages.d.ts
+15 -3
View File
@@ -78,6 +78,7 @@ var harnessSources = [
"projectsRunner.ts",
"loggedIO.ts",
"rwcRunner.ts",
"test262Runner.ts",
"runner.ts"
].map(function (f) {
return path.join(harnessDirectory, f);
@@ -91,10 +92,12 @@ var harnessSources = [
var librarySourceMap = [
{ target: "lib.core.d.ts", sources: ["core.d.ts"] },
{ target: "lib.dom.d.ts", sources: ["importcore.d.ts", "extensions.d.ts", "dom.generated.d.ts"], },
{ target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "extensions.d.ts", "webworker.generated.d.ts"], },
{ target: "lib.dom.d.ts", sources: ["importcore.d.ts", "extensions.d.ts", "intl.d.ts", "dom.generated.d.ts"], },
{ target: "lib.webworker.d.ts", sources: ["importcore.d.ts", "extensions.d.ts", "intl.d.ts", "webworker.generated.d.ts"], },
{ target: "lib.scriptHost.d.ts", sources: ["importcore.d.ts", "scriptHost.d.ts"], },
{ target: "lib.d.ts", sources: ["core.d.ts", "extensions.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
{ target: "lib.d.ts", sources: ["core.d.ts", "extensions.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"], },
{ target: "lib.core.es6.d.ts", sources: ["core.d.ts", "es6.d.ts"]},
{ target: "lib.es6.d.ts", sources: ["core.d.ts", "es6.d.ts", "intl.d.ts", "dom.generated.d.ts", "webworker.importscripts.d.ts", "scriptHost.d.ts"]},
];
var libraryTargets = librarySourceMap.map(function (f) {
@@ -341,6 +344,9 @@ var refBaseline = "tests/baselines/reference/";
var localRwcBaseline = "tests/baselines/rwc/local/";
var refRwcBaseline = "tests/baselines/rwc/reference/";
var localTest262Baseline = "tests/baselines/test262/local/";
var refTest262Baseline = "tests/baselines/test262/reference/";
desc("Builds the test infrastructure using the built compiler");
task("tests", ["local", run].concat(libraryTargets));
@@ -509,6 +515,12 @@ task("baseline-accept-rwc", function() {
fs.renameSync(localRwcBaseline, refRwcBaseline);
});
desc("Makes the most recent test262 test results the new baseline, overwriting the old baseline");
task("baseline-accept-test262", function() {
jake.rmRf(refTest262Baseline);
fs.renameSync(localTest262Baseline, refTest262Baseline);
});
// Webhost
var webhostPath = "tests/webhost/webtsc.ts";
+2 -2
View File
@@ -5452,7 +5452,7 @@ module ts {
forEach(rootNames, name => processRootFile(name, false));
if (!seenNoDefaultLib) {
processRootFile(host.getDefaultLibFilename(), true);
processRootFile(host.getDefaultLibFilename(options), true);
}
verifyCompilerOptions();
errors.sort(compareDiagnostics);
@@ -5496,7 +5496,7 @@ module ts {
}
var diagnostic: DiagnosticMessage;
if (hasExtension(filename)) {
if (!fileExtensionIs(filename, ".ts")) {
if (!options.allowNonTsExtensions && !fileExtensionIs(filename, ".ts")) {
diagnostic = Diagnostics.File_0_must_have_extension_ts_or_d_ts;
}
else if (!findSourceFile(filename, isDefaultLib, refFile, refPos, refEnd)) {
+1 -1
View File
@@ -193,7 +193,7 @@ module ts {
return {
getSourceFile,
getDefaultLibFilename: () => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), "lib.d.ts"),
getDefaultLibFilename: options => combinePaths(getDirectoryPath(normalizePath(sys.getExecutingFilePath())), options.target === ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts"),
writeFile,
getCurrentDirectory: () => currentDirectory || (currentDirectory = sys.getCurrentDirectory()),
useCaseSensitiveFileNames: () => sys.useCaseSensitiveFileNames,
+2 -1
View File
@@ -1306,6 +1306,7 @@ module ts {
version?: boolean;
watch?: boolean;
preserveConstEnums?: boolean;
allowNonTsExtensions?: boolean;
[option: string]: string | number | boolean;
}
@@ -1487,7 +1488,7 @@ module ts {
export interface CompilerHost {
getSourceFile(filename: string, languageVersion: ScriptTarget, onError?: (message: string) => void): SourceFile;
getDefaultLibFilename(): string;
getDefaultLibFilename(options: CompilerOptions): string;
getCancellationToken? (): CancellationToken;
writeFile(filename: string, data: string, writeByteOrderMark: boolean, onError?: (message: string) => void): void;
getCurrentDirectory(): string;
+4 -16
View File
@@ -113,10 +113,7 @@ class CompilerBaselineRunner extends RunnerBase {
for (var i = 0; i < tcSettings.length; ++i) {
// noImplicitAny is passed to getCompiler, but target is just passed in the settings blob to setCompilerSettings
if (!createNewInstance && (tcSettings[i].flag == "noimplicitany" || tcSettings[i].flag === 'target')) {
harnessCompiler = Harness.Compiler.getCompiler({
useExistingInstance: false,
optionsForFreshInstance: { useMinimalDefaultLib: true, noImplicitAny: tcSettings[i].flag === "noimplicitany" }
});
harnessCompiler = Harness.Compiler.getCompiler();
harnessCompiler.setCompilerSettings(tcSettings);
createNewInstance = true;
}
@@ -125,10 +122,7 @@ class CompilerBaselineRunner extends RunnerBase {
afterEach(() => {
if (createNewInstance) {
harnessCompiler = Harness.Compiler.getCompiler({
useExistingInstance: false,
optionsForFreshInstance: { useMinimalDefaultLib: true, noImplicitAny: false }
});
harnessCompiler = Harness.Compiler.getCompiler();
createNewInstance = false;
}
});
@@ -323,10 +317,7 @@ class CompilerBaselineRunner extends RunnerBase {
public initializeTests() {
describe("Setup compiler for compiler baselines", () => {
var harnessCompiler = Harness.Compiler.getCompiler({
useExistingInstance: false,
optionsForFreshInstance: { useMinimalDefaultLib: true, noImplicitAny: false }
});
var harnessCompiler = Harness.Compiler.getCompiler();
this.parseOptions();
});
@@ -343,10 +334,7 @@ class CompilerBaselineRunner extends RunnerBase {
}
describe("Cleanup after compiler baselines", () => {
var harnessCompiler = Harness.Compiler.getCompiler({
useExistingInstance: false,
optionsForFreshInstance: { useMinimalDefaultLib: true, noImplicitAny: false }
});
var harnessCompiler = Harness.Compiler.getCompiler();
});
}
-8
View File
@@ -15,10 +15,6 @@ class FourslashRunner extends RunnerBase {
}
describe("fourslash tests", () => {
before(() => {
Harness.Compiler.getCompiler({ useExistingInstance: false });
});
this.tests.forEach((fn: string) => {
fn = ts.normalizeSlashes(fn);
var justName = fn.replace(/^.*[\\\/]/, '');
@@ -33,10 +29,6 @@ class FourslashRunner extends RunnerBase {
});
}
});
after(() => {
Harness.Compiler.getCompiler({ useExistingInstance: false });
});
});
describe('Generate Tao XML', () => {
+29 -16
View File
@@ -1,3 +1,4 @@
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
@@ -538,6 +539,8 @@ module Harness {
export var defaultLibFileName = 'lib.d.ts';
export var defaultLibSourceFile = ts.createSourceFile(defaultLibFileName, IO.readFile(libFolder + 'lib.core.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest, /*version:*/ "0");
export var defaultES6LibSourceFile = ts.createSourceFile(defaultLibFileName, IO.readFile(libFolder + 'lib.core.es6.d.ts'), /*languageVersion*/ ts.ScriptTarget.Latest, /*version:*/ "0");
// Cache these between executions so we don't have to re-parse them for every test
export var fourslashFilename = 'fourslash.ts';
@@ -580,15 +583,14 @@ module Harness {
return fourslashSourceFile;
}
else {
var lib = defaultLibFileName;
if (fn === defaultLibFileName) {
return defaultLibSourceFile;
return languageVersion === ts.ScriptTarget.ES6 ? defaultES6LibSourceFile : defaultLibSourceFile;
}
// Don't throw here -- the compiler might be looking for a test that actually doesn't exist as part of the TC
return undefined;
}
},
getDefaultLibFilename: () => defaultLibFileName,
getDefaultLibFilename: options => defaultLibFileName,
writeFile,
getCanonicalFileName,
useCaseSensitiveFileNames: () => useCaseSensitiveFileNames,
@@ -1016,19 +1018,30 @@ module Harness {
sys.newLine + sys.newLine + outputLines.join('\r\n');
}
/* TODO: Delete?
export function makeDefaultCompilerSettings(options?: { useMinimalDefaultLib: boolean; noImplicitAny: boolean; }) {
var useMinimalDefaultLib = options ? options.useMinimalDefaultLib : true;
var noImplicitAny = options ? options.noImplicitAny : false;
var settings = new TypeScript.CompilationSettings();
settings.codeGenTarget = TypeScript.LanguageVersion.EcmaScript5;
settings.moduleGenTarget = TypeScript.ModuleGenTarget.Synchronous;
settings.noLib = useMinimalDefaultLib;
settings.noResolve = false;
settings.noImplicitAny = noImplicitAny;
return settings;
export function collateOutputs(outputFiles: Harness.Compiler.GeneratedFile[], clean?: (s: string) => string) {
// Collect, test, and sort the filenames
function cleanName(fn: string) {
var lastSlash = ts.normalizeSlashes(fn).lastIndexOf('/');
return fn.substr(lastSlash + 1).toLowerCase();
}
outputFiles.sort((a, b) => cleanName(a.fileName).localeCompare(cleanName(b.fileName)));
// Emit them
var result = '';
ts.forEach(outputFiles, outputFile => {
// Some extra spacing if this isn't the first file
if (result.length) result = result + '\r\n\r\n';
// Filename header + content
result = result + '/*====== ' + outputFile.fileName + ' ======*/\r\n';
if (clean) {
result = result + clean(outputFile.code);
} else {
result = result + outputFile.code;
}
});
return result;
}
*/
/** The harness' compiler instance used when tests are actually run. Reseting or changing settings of this compiler instance must be done within a test case (i.e., describe/it) */
var harnessCompiler: HarnessCompiler;
@@ -1036,7 +1049,7 @@ module Harness {
/** Returns the singleton harness compiler instance for generating and running tests.
If required a fresh compiler instance will be created, otherwise the existing singleton will be re-used.
*/
export function getCompiler(opts?: { useExistingInstance: boolean; optionsForFreshInstance?: { useMinimalDefaultLib: boolean; noImplicitAny: boolean; } }) {
export function getCompiler() {
return harnessCompiler = harnessCompiler || new HarnessCompiler();
}
+2 -2
View File
@@ -171,7 +171,7 @@ class ProjectRunner extends RunnerBase {
function getSourceFile(filename: string, languageVersion: ts.ScriptTarget): ts.SourceFile {
var sourceFile: ts.SourceFile = undefined;
if (filename === Harness.Compiler.defaultLibFileName) {
sourceFile = Harness.Compiler.defaultLibSourceFile;
sourceFile = languageVersion === ts.ScriptTarget.ES6 ? Harness.Compiler.defaultES6LibSourceFile : Harness.Compiler.defaultLibSourceFile;
}
else {
var text = getSourceFileText(filename);
@@ -186,7 +186,7 @@ class ProjectRunner extends RunnerBase {
function createCompilerHost(): ts.CompilerHost {
return {
getSourceFile,
getDefaultLibFilename: () => "lib.d.ts",
getDefaultLibFilename: options => options.target === ts.ScriptTarget.ES6 ? "lib.es6.d.ts" : "lib.d.ts",
writeFile,
getCurrentDirectory,
getCanonicalFileName: Harness.Compiler.getCanonicalFileName,
+5 -2
View File
@@ -13,9 +13,9 @@
// limitations under the License.
//
/// <reference path='test262Runner.ts' />
/// <reference path='compilerRunner.ts' />
// TODO: re-enable
// ///<reference path='fourslashRunner.ts' />
/// <reference path='fourslashRunner.ts' />
/// <reference path='projectsRunner.ts' />
/// <reference path='rwcRunner.ts' />
@@ -69,6 +69,9 @@ if (testConfigFile !== '') {
case 'rwc':
runners.push(new RWCRunner());
break;
case 'test262':
runners.push(new Test262BaselineRunner());
break;
case 'reverse':
reverse = true;
break;
+3 -28
View File
@@ -20,31 +20,6 @@ module RWC {
}
}
function collateOutputs(outputFiles: Harness.Compiler.GeneratedFile[], clean?: (s: string) => string) {
// Collect, test, and sort the filenames
function cleanName(fn: string) {
var lastSlash = ts.normalizeSlashes(fn).lastIndexOf('/');
return fn.substr(lastSlash + 1).toLowerCase();
}
outputFiles.sort((a, b) => cleanName(a.fileName).localeCompare(cleanName(b.fileName)));
// Emit them
var result = '';
ts.forEach(outputFiles, outputFile => {
// Some extra spacing if this isn't the first file
if (result.length) result = result + '\r\n\r\n';
// Filename header + content
result = result + '/*====== ' + outputFile.fileName + ' ======*/\r\n';
if (clean) {
result = result + clean(outputFile.code);
} else {
result = result + outputFile.code;
}
});
return result;
}
export function runRWCTest(jsonPath: string) {
describe("Testing a RWC project: " + jsonPath, () => {
var inputFiles: { unitName: string; content: string; }[] = [];
@@ -136,7 +111,7 @@ module RWC {
it('has the expected emitted code', () => {
Harness.Baseline.runBaseline('has the expected emitted code', baseName + '.output.js', () => {
return collateOutputs(compilerResult.files, s => SyntacticCleaner.clean(s));
return Harness.Compiler.collateOutputs(compilerResult.files, s => SyntacticCleaner.clean(s));
}, false, baselineOpts);
});
@@ -145,7 +120,7 @@ module RWC {
if (compilerResult.errors.length || !compilerResult.declFilesCode.length) {
return null;
}
return collateOutputs(compilerResult.declFilesCode);
return Harness.Compiler.collateOutputs(compilerResult.declFilesCode);
}, false, baselineOpts);
});
@@ -155,7 +130,7 @@ module RWC {
return null;
}
return collateOutputs(compilerResult.sourceMaps);
return Harness.Compiler.collateOutputs(compilerResult.sourceMaps);
}, false, baselineOpts);
});
+139
View File
@@ -0,0 +1,139 @@
/// <reference path='harness.ts' />
/// <reference path='runnerbase.ts' />
/// <reference path='syntacticCleaner.ts' />
class Test262BaselineRunner extends RunnerBase {
private static basePath = 'tests/cases/test262';
private static helpersFilePath = 'tests/cases/test262-harness/helpers.d.ts';
private static helperFile = {
unitName: Test262BaselineRunner.helpersFilePath,
content: Harness.IO.readFile(Test262BaselineRunner.helpersFilePath)
};
private static testFileExtensionRegex = /\.js$/;
private static options: ts.CompilerOptions = {
allowNonTsExtensions: true,
target: ts.ScriptTarget.Latest,
module: ts.ModuleKind.CommonJS
};
private static baselineOptions: Harness.Baseline.BaselineOptions = { Subfolder: 'test262' };
private static getTestFilePath(filename: string): string {
return Test262BaselineRunner.basePath + "/" + filename;
}
private static serializeSourceFile(file: ts.SourceFile): string {
function getKindName(k: number): string {
return (<any>ts).SyntaxKind[k]
}
function serializeNode(n: ts.Node): any {
var o = { kind: getKindName(n.kind) };
ts.forEach(Object.getOwnPropertyNames(n), i => {
switch (i) {
case "parent":
case "symbol":
case "locals":
case "localSymbol":
case "kind":
case "semanticDiagnostics":
case "parseDiagnostics":
case "grammarDiagnostics":
return undefined;
case "nextContainer":
if (n.nextContainer) {
(<any>o)[i] = { kind: getKindName(n.nextContainer.kind), pos: n.nextContainer.pos, end: n.nextContainer.end };
return undefined;
}
case "text":
if (n.kind === ts.SyntaxKind.SourceFile) return undefined;
default:
(<any>o)[i] = ((<any>n)[i]);
}
return undefined;
});
return o;
}
return JSON.stringify(file,(k, v) => {
return (v && typeof v.pos === "number") ? serializeNode(v) : v;
}, " ");
}
private runTest(filePath: string) {
describe('test262 test for ' + filePath, () => {
// Mocha holds onto the closure environment of the describe callback even after the test is done.
// Everything declared here should be cleared out in the "after" callback.
var testState: {
filename: string;
compilerResult: Harness.Compiler.CompilerResult;
inputFiles: { unitName: string; content: string }[];
checker: ts.TypeChecker;
};
before(() => {
var content = Harness.IO.readFile(filePath);
var testFilename = ts.removeFileExtension(filePath).replace(/\//g, '_') + ".test";
var testCaseContent = Harness.TestCaseParser.makeUnitsFromTest(content, testFilename);
var inputFiles = testCaseContent.testUnitData.map(unit => {
return { unitName: Test262BaselineRunner.getTestFilePath(unit.name), content: unit.content };
});
// Emit the results
testState = {
filename: testFilename,
inputFiles: inputFiles,
compilerResult: undefined,
checker: undefined,
};
Harness.Compiler.getCompiler().compileFiles([Test262BaselineRunner.helperFile].concat(inputFiles), /*otherFiles*/ [], (compilerResult, checker) => {
testState.compilerResult = compilerResult;
testState.checker = checker;
}, /*settingsCallback*/ undefined, Test262BaselineRunner.options);
});
after(() => {
testState = undefined;
});
it('has the expected emitted code', () => {
Harness.Baseline.runBaseline('has the expected emitted code', testState.filename + '.output.js', () => {
var files = testState.compilerResult.files.filter(f=> f.fileName !== Test262BaselineRunner.helpersFilePath);
return Harness.Compiler.collateOutputs(files, s => SyntacticCleaner.clean(s));
}, false, Test262BaselineRunner.baselineOptions);
});
it('has the expected errors', () => {
Harness.Baseline.runBaseline('has the expected errors', testState.filename + '.errors.txt', () => {
var errors = testState.compilerResult.errors;
if (errors.length === 0) {
return null;
}
return Harness.Compiler.getErrorBaseline(testState.inputFiles, errors);
}, false, Test262BaselineRunner.baselineOptions);
});
it('has the expected AST',() => {
Harness.Baseline.runBaseline('has the expected AST', testState.filename + '.AST.txt',() => {
var sourceFile = testState.checker.getProgram().getSourceFile(Test262BaselineRunner.getTestFilePath(testState.filename));
return Test262BaselineRunner.serializeSourceFile(sourceFile);
}, false, Test262BaselineRunner.baselineOptions);
});
});
}
public initializeTests() {
// this will set up a series of describe/it blocks to run between the setup and cleanup phases
if (this.tests.length === 0) {
var testFiles = this.enumerateFiles(Test262BaselineRunner.basePath, Test262BaselineRunner.testFileExtensionRegex, { recursive: true });
testFiles.forEach(fn => {
this.runTest(ts.normalizePath(fn));
});
}
else {
this.tests.forEach(test => this.runTest(test));
}
}
}
+63 -23
View File
@@ -109,10 +109,7 @@ interface Object {
propertyIsEnumerable(v: string): boolean;
}
/**
* Provides functionality common to all JavaScript objects.
*/
declare var Object: {
interface ObjectConstructor {
new (value?: any): Object;
(): any;
(value: any): any;
@@ -206,6 +203,11 @@ declare var Object: {
keys(o: any): string[];
}
/**
* Provides functionality common to all JavaScript objects.
*/
declare var Object: ObjectConstructor;
/**
* Creates a new function.
*/
@@ -240,8 +242,8 @@ interface Function {
caller: Function;
}
declare var Function: {
/**
interface FunctionConstructor {
/**
* Creates a new function.
* @param args A list of arguments the function accepts.
*/
@@ -250,6 +252,8 @@ declare var Function: {
prototype: Function;
}
declare var Function: FunctionConstructor;
interface IArguments {
[index: number]: any;
length: number;
@@ -409,24 +413,29 @@ interface String {
[index: number]: string;
}
/**
* Allows manipulation and formatting of text strings and determination and location of substrings within strings.
*/
declare var String: {
interface StringConstructor {
new (value?: any): String;
(value?: any): string;
prototype: String;
fromCharCode(...codes: number[]): string;
}
/**
* Allows manipulation and formatting of text strings and determination and location of substrings within strings.
*/
declare var String: StringConstructor;
interface Boolean {
}
declare var Boolean: {
interface BooleanConstructor {
new (value?: any): Boolean;
(value?: any): boolean;
prototype: Boolean;
}
declare var Boolean: BooleanConstructor;
interface Number {
/**
* Returns a string representation of an object.
@@ -453,8 +462,7 @@ interface Number {
toPrecision(precision?: number): string;
}
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
declare var Number: {
interface NumberConstructor {
new (value?: any): Number;
(value?: any): number;
prototype: Number;
@@ -484,6 +492,9 @@ declare var Number: {
POSITIVE_INFINITY: number;
}
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
declare var Number: NumberConstructor;
interface TemplateStringsArray extends Array<string> {
raw: string[];
}
@@ -753,7 +764,7 @@ interface Date {
toJSON(key?: any): string;
}
declare var Date: {
interface DateConstructor {
new (): Date;
new (value: number): Date;
new (value: string): Date;
@@ -779,6 +790,8 @@ declare var Date: {
now(): number;
}
declare var Date: DateConstructor;
interface RegExpMatchArray extends Array<string> {
index?: number;
input?: string;
@@ -819,7 +832,8 @@ interface RegExp {
// Non-standard extensions
compile(): RegExp;
}
declare var RegExp: {
interface RegExpConstructor {
new (pattern: string, flags?: string): RegExp;
(pattern: string, flags?: string): RegExp;
prototype: RegExp;
@@ -837,64 +851,87 @@ declare var RegExp: {
lastMatch: string;
}
declare var RegExp: RegExpConstructor;
interface Error {
name: string;
message: string;
}
declare var Error: {
interface ErrorConstructor {
new (message?: string): Error;
(message?: string): Error;
prototype: Error;
}
declare var Error: ErrorConstructor;
interface EvalError extends Error {
}
declare var EvalError: {
interface EvalErrorConstructor {
new (message?: string): EvalError;
(message?: string): EvalError;
prototype: EvalError;
}
declare var EvalError: EvalErrorConstructor;
interface RangeError extends Error {
}
declare var RangeError: {
interface RangeErrorConstructor {
new (message?: string): RangeError;
(message?: string): RangeError;
prototype: RangeError;
}
declare var RangeError: RangeErrorConstructor;
interface ReferenceError extends Error {
}
declare var ReferenceError: {
interface ReferenceErrorConstructor {
new (message?: string): ReferenceError;
(message?: string): ReferenceError;
prototype: ReferenceError;
}
declare var ReferenceError: ReferenceErrorConstructor;
interface SyntaxError extends Error {
}
declare var SyntaxError: {
interface SyntaxErrorConstructor {
new (message?: string): SyntaxError;
(message?: string): SyntaxError;
prototype: SyntaxError;
}
declare var SyntaxError: SyntaxErrorConstructor;
interface TypeError extends Error {
}
declare var TypeError: {
interface TypeErrorConstructor {
new (message?: string): TypeError;
(message?: string): TypeError;
prototype: TypeError;
}
declare var TypeError: TypeErrorConstructor;
interface URIError extends Error {
}
declare var URIError: {
interface URIErrorConstructor {
new (message?: string): URIError;
(message?: string): URIError;
prototype: URIError;
}
declare var URIError: URIErrorConstructor;
interface JSON {
/**
* Converts a JavaScript Object Notation (JSON) string into an object.
@@ -1097,7 +1134,8 @@ interface Array<T> {
[n: number]: T;
}
declare var Array: {
interface ArrayConstructor {
new (arrayLength?: number): any[];
new <T>(arrayLength: number): T[];
new <T>(...items: T[]): T[];
@@ -1107,3 +1145,5 @@ declare var Array: {
isArray(arg: any): boolean;
prototype: Array<any>;
}
declare var Array: ArrayConstructor;
+3637
View File
File diff suppressed because it is too large Load Diff
-166
View File
@@ -658,169 +658,3 @@ declare var Set: {
new <T>(): Set<T>;
prototype: Set<any>;
}
declare module Intl {
interface CollatorOptions {
usage?: string;
localeMatcher?: string;
numeric?: boolean;
caseFirst?: string;
sensitivity?: string;
ignorePunctuation?: boolean;
}
interface ResolvedCollatorOptions {
locale: string;
usage: string;
sensitivity: string;
ignorePunctuation: boolean;
collation: string;
caseFirst: string;
numeric: boolean;
}
interface Collator {
compare(x: string, y: string): number;
resolvedOptions(): ResolvedCollatorOptions;
}
var Collator: {
new (locales?: string[], options?: CollatorOptions): Collator;
new (locale?: string, options?: CollatorOptions): Collator;
(locales?: string[], options?: CollatorOptions): Collator;
(locale?: string, options?: CollatorOptions): Collator;
supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];
supportedLocalesOf(locale: string, options?: CollatorOptions): string[];
}
interface NumberFormatOptions {
localeMatcher?: string;
style?: string;
currency?: string;
currencyDisplay?: string;
useGrouping?: boolean;
}
interface ResolvedNumberFormatOptions {
locale: string;
numberingSystem: string;
style: string;
currency?: string;
currencyDisplay?: string;
minimumintegerDigits: number;
minimumFractionDigits: number;
maximumFractionDigits: number;
minimumSignificantDigits?: number;
maximumSignificantDigits?: number;
useGrouping: boolean;
}
interface NumberFormat {
format(value: number): string;
resolvedOptions(): ResolvedNumberFormatOptions;
}
var NumberFormat: {
new (locales?: string[], options?: NumberFormatOptions): Collator;
new (locale?: string, options?: NumberFormatOptions): Collator;
(locales?: string[], options?: NumberFormatOptions): Collator;
(locale?: string, options?: NumberFormatOptions): Collator;
supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];
supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];
}
interface DateTimeFormatOptions {
localeMatcher?: string;
weekday?: string;
era?: string;
year?: string;
month?: string;
day?: string;
hour?: string;
minute?: string;
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12: boolean;
}
interface ResolvedDateTimeFormatOptions {
locale: string;
calendar: string;
numberingSystem: string;
timeZone: string;
hour12?: boolean;
weekday?: string;
era?: string;
year?: string;
month?: string;
day?: string;
hour?: string;
minute?: string;
second?: string;
timeZoneName?: string;
}
interface DateTimeFormat {
format(date: number): string;
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
var DateTimeFormat: {
new (locales?: string[], options?: DateTimeFormatOptions): Collator;
new (locale?: string, options?: DateTimeFormatOptions): Collator;
(locales?: string[], options?: DateTimeFormatOptions): Collator;
(locale?: string, options?: DateTimeFormatOptions): Collator;
supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];
supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];
}
}
interface String {
/**
* Determines whether two strings are equivalent in the current locale.
* @param that String to compare to target string
* @param locales An 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: string[], options?: Intl.CollatorOptions): number;
/**
* Determines whether two strings are equivalent in the current locale.
* @param that String to compare to target string
* @param locale Locale tag. 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, locale: string, options?: Intl.CollatorOptions): number;
}
interface Number {
/**
* Converts a number to a string by using the current or specified locale.
* @param locales An 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.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;
/**
* Converts a number to a string by using the current or specified locale.
* @param locale Locale tag. 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(locale?: string, options?: Intl.NumberFormatOptions): string;
}
interface Date {
/**
* Converts a date to a string by using the current or specified locale.
* @param locales An 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.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
/**
* Converts a date to a string by using the current or specified locale.
* @param locale Locale tag. 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(locale?: string, options?: Intl.DateTimeFormatOptions): string;
}
+168
View File
@@ -0,0 +1,168 @@
/////////////////////////////
/// ECMAScript Internationalization API
/////////////////////////////
declare module Intl {
interface CollatorOptions {
usage?: string;
localeMatcher?: string;
numeric?: boolean;
caseFirst?: string;
sensitivity?: string;
ignorePunctuation?: boolean;
}
interface ResolvedCollatorOptions {
locale: string;
usage: string;
sensitivity: string;
ignorePunctuation: boolean;
collation: string;
caseFirst: string;
numeric: boolean;
}
interface Collator {
compare(x: string, y: string): number;
resolvedOptions(): ResolvedCollatorOptions;
}
var Collator: {
new (locales?: string[], options?: CollatorOptions): Collator;
new (locale?: string, options?: CollatorOptions): Collator;
(locales?: string[], options?: CollatorOptions): Collator;
(locale?: string, options?: CollatorOptions): Collator;
supportedLocalesOf(locales: string[], options?: CollatorOptions): string[];
supportedLocalesOf(locale: string, options?: CollatorOptions): string[];
}
interface NumberFormatOptions {
localeMatcher?: string;
style?: string;
currency?: string;
currencyDisplay?: string;
useGrouping?: boolean;
}
interface ResolvedNumberFormatOptions {
locale: string;
numberingSystem: string;
style: string;
currency?: string;
currencyDisplay?: string;
minimumintegerDigits: number;
minimumFractionDigits: number;
maximumFractionDigits: number;
minimumSignificantDigits?: number;
maximumSignificantDigits?: number;
useGrouping: boolean;
}
interface NumberFormat {
format(value: number): string;
resolvedOptions(): ResolvedNumberFormatOptions;
}
var NumberFormat: {
new (locales?: string[], options?: NumberFormatOptions): Collator;
new (locale?: string, options?: NumberFormatOptions): Collator;
(locales?: string[], options?: NumberFormatOptions): Collator;
(locale?: string, options?: NumberFormatOptions): Collator;
supportedLocalesOf(locales: string[], options?: NumberFormatOptions): string[];
supportedLocalesOf(locale: string, options?: NumberFormatOptions): string[];
}
interface DateTimeFormatOptions {
localeMatcher?: string;
weekday?: string;
era?: string;
year?: string;
month?: string;
day?: string;
hour?: string;
minute?: string;
second?: string;
timeZoneName?: string;
formatMatcher?: string;
hour12: boolean;
}
interface ResolvedDateTimeFormatOptions {
locale: string;
calendar: string;
numberingSystem: string;
timeZone: string;
hour12?: boolean;
weekday?: string;
era?: string;
year?: string;
month?: string;
day?: string;
hour?: string;
minute?: string;
second?: string;
timeZoneName?: string;
}
interface DateTimeFormat {
format(date: number): string;
resolvedOptions(): ResolvedDateTimeFormatOptions;
}
var DateTimeFormat: {
new (locales?: string[], options?: DateTimeFormatOptions): Collator;
new (locale?: string, options?: DateTimeFormatOptions): Collator;
(locales?: string[], options?: DateTimeFormatOptions): Collator;
(locale?: string, options?: DateTimeFormatOptions): Collator;
supportedLocalesOf(locales: string[], options?: DateTimeFormatOptions): string[];
supportedLocalesOf(locale: string, options?: DateTimeFormatOptions): string[];
}
}
interface String {
/**
* Determines whether two strings are equivalent in the current locale.
* @param that String to compare to target string
* @param locales An 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: string[], options?: Intl.CollatorOptions): number;
/**
* Determines whether two strings are equivalent in the current locale.
* @param that String to compare to target string
* @param locale Locale tag. 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, locale: string, options?: Intl.CollatorOptions): number;
}
interface Number {
/**
* Converts a number to a string by using the current or specified locale.
* @param locales An 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.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;
/**
* Converts a number to a string by using the current or specified locale.
* @param locale Locale tag. 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(locale?: string, options?: Intl.NumberFormatOptions): string;
}
interface Date {
/**
* Converts a date to a string by using the current or specified locale.
* @param locales An 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.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
/**
* Converts a date to a string by using the current or specified locale.
* @param locale Locale tag. 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(locale?: string, options?: Intl.DateTimeFormatOptions): string;
}
+4 -4
View File
@@ -863,7 +863,7 @@ module ts {
getLocalizedDiagnosticMessages(): any;
getCancellationToken(): CancellationToken;
getCurrentDirectory(): string;
getDefaultLibFilename(): string;
getDefaultLibFilename(options: CompilerOptions): string;
}
//
@@ -2098,8 +2098,8 @@ module ts {
getCanonicalFileName: (filename) => useCaseSensitivefilenames ? filename : filename.toLowerCase(),
useCaseSensitiveFileNames: () => useCaseSensitivefilenames,
getNewLine: () => "\r\n",
getDefaultLibFilename: (): string => {
return host.getDefaultLibFilename();
getDefaultLibFilename: (options): string => {
return host.getDefaultLibFilename(options);
},
writeFile: (filename, data, writeByteOrderMark) => {
writer(filename, data, writeByteOrderMark);
@@ -2244,7 +2244,7 @@ module ts {
filename = normalizeSlashes(filename);
return program.getDiagnostics(getSourceFile(filename).getSourceFile());
return program.getDiagnostics(getSourceFile(filename));
}
/**
+3 -3
View File
@@ -49,7 +49,7 @@ module ts {
getLocalizedDiagnosticMessages(): string;
getCancellationToken(): CancellationToken;
getCurrentDirectory(): string;
getDefaultLibFilename(): string;
getDefaultLibFilename(options: string): string;
}
///
@@ -388,8 +388,8 @@ module ts {
return this.shimHost.getCancellationToken();
}
public getDefaultLibFilename(): string {
return this.shimHost.getDefaultLibFilename();
public getDefaultLibFilename(options: CompilerOptions): string {
return this.shimHost.getDefaultLibFilename(JSON.stringify(options));
}
public getCurrentDirectory(): string {
@@ -17,6 +17,6 @@ module A {
export var beez2 = new Array<B>();
>beez2 : B[]
>new Array<B>() : B[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
>B : B
}
+1 -1
View File
@@ -18,7 +18,7 @@ a.concat('Hello');
var b = new Array<string>();
>b : string[]
>new Array<string>() : string[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
b.concat('hello');
>b.concat('hello') : string[]
@@ -6,19 +6,19 @@ x = new Array(1);
>x = new Array(1) : any[]
>x : string[]
>new Array(1) : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
x = new Array('hi', 'bye');
>x = new Array('hi', 'bye') : string[]
>x : string[]
>new Array('hi', 'bye') : string[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
x = new Array<string>('hi', 'bye');
>x = new Array<string>('hi', 'bye') : string[]
>x : string[]
>new Array<string>('hi', 'bye') : string[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
var y: number[];
>y : number[]
@@ -27,17 +27,17 @@ y = new Array(1);
>y = new Array(1) : any[]
>y : number[]
>new Array(1) : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
y = new Array(1,2);
>y = new Array(1,2) : number[]
>y : number[]
>new Array(1,2) : number[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
y = new Array<number>(1, 2);
>y = new Array<number>(1, 2) : number[]
>y : number[]
>new Array<number>(1, 2) : number[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
+4 -4
View File
@@ -8,7 +8,7 @@ var x = [];
var x = new Array(1);
>x : any[]
>new Array(1) : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
var y = [1];
>y : number[]
@@ -21,7 +21,7 @@ var y = [1, 2];
var y = new Array<number>();
>y : number[]
>new Array<number>() : number[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
var x2: number[] = [];
>x2 : number[]
@@ -30,7 +30,7 @@ var x2: number[] = [];
var x2: number[] = new Array(1);
>x2 : number[]
>new Array(1) : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
var y2: number[] = [1];
>y2 : number[]
@@ -43,5 +43,5 @@ var y2: number[] = [1, 2];
var y2: number[] = new Array<number>();
>y2 : number[]
>new Array<number>() : number[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
@@ -2,9 +2,9 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,30): error TS1109: Expression expected.
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,22): error TS1005: '=' expected.
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,32): error TS1109: Expression expected.
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(6,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
Property 'isArray' is missing in type 'Number'.
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(7,5): error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
==== tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts (6 errors) ====
@@ -19,7 +19,7 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
~
!!! error TS1109: Expression expected.
~~~
!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
!!! error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
!!! error TS2322: Property 'isArray' is missing in type 'Number'.
var xs4: typeof Array<typeof x>;
~
@@ -27,4 +27,4 @@ tests/cases/conformance/types/specifyingTypes/typeLiterals/arrayTypeOfTypeOf.ts(
~
!!! error TS1109: Expression expected.
~~~
!!! error TS2322: Type 'number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
!!! error TS2322: Type 'number' is not assignable to type 'ArrayConstructor'.
@@ -7,5 +7,5 @@ var xx = <Foo> new Object();
><Foo> new Object() : Foo
>Foo : Foo
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
@@ -108,7 +108,7 @@ true, {}
"string", new Date()
>"string", new Date() : Date
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
STRING.toLowerCase(), new CLASS()
>STRING.toLowerCase(), new CLASS() : CLASS
@@ -154,7 +154,7 @@ var resultIsObject10 = ("string", new Date());
>("string", new Date()) : Date
>"string", new Date() : Date
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var resultIsObject11 = (STRING.toLowerCase(), new CLASS());
>resultIsObject11 : CLASS
@@ -90,7 +90,7 @@ ANY = new Date(), STRING;
>ANY = new Date() : Date
>ANY : any
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>STRING : string
true, "";
@@ -115,7 +115,7 @@ OBJECT = new Object, STRING + "string";
>OBJECT = new Object : Object
>OBJECT : Object
>new Object : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>STRING + "string" : string
>STRING : string
@@ -132,7 +132,7 @@ var resultIsString7 = (ANY = new Date(), STRING);
>ANY = new Date() : Date
>ANY : any
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>STRING : string
var resultIsString8 = (true, "");
@@ -163,7 +163,7 @@ var resultIsString11 = (new Object, STRING + "string");
>(new Object, STRING + "string") : string
>new Object, STRING + "string" : string
>new Object : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>STRING + "string" : string
>STRING : string
@@ -112,7 +112,7 @@ null, true, 1;
>STRING : string
>charAt : (pos: number) => string
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
var resultIsNumber2 = (null, true, 1);
>resultIsNumber2 : number
@@ -132,5 +132,5 @@ var resultIsObject2 = (++NUMBER, STRING.charAt(0), new Object());
>STRING : string
>charAt : (pos: number) => string
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
@@ -133,7 +133,7 @@ foo() ? exprAny1 : exprAny2;
new Date() ? exprBoolean1 : exprBoolean2;
>new Date() ? exprBoolean1 : exprBoolean2 : boolean
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>exprBoolean1 : boolean
>exprBoolean2 : boolean
@@ -262,7 +262,7 @@ var resultIsBoolean3 = new Date() ? exprBoolean1 : exprBoolean2;
>resultIsBoolean3 : boolean
>new Date() ? exprBoolean1 : exprBoolean2 : boolean
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>exprBoolean1 : boolean
>exprBoolean2 : boolean
@@ -7,7 +7,7 @@ class Rule {
>regex : RegExp
>RegExp : RegExp
>new RegExp('') : RegExp
>RegExp : { (pattern: string, flags?: string): RegExp; new (pattern: string, flags?: string): RegExp; prototype: RegExp; $1: string; $2: string; $3: string; $4: string; $5: string; $6: string; $7: string; $8: string; $9: string; lastMatch: string; }
>RegExp : RegExpConstructor
public name: string = '';
>name : string
@@ -1,5 +1,5 @@
tests/cases/compiler/errorMessageOnObjectLiteralType.ts(5,3): error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'.
tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'.
tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2339: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'.
==== tests/cases/compiler/errorMessageOnObjectLiteralType.ts (2 errors) ====
@@ -12,4 +12,4 @@ tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2339: Prop
!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'.
Object.getOwnPropertyNamess(null);
~~~~~~~~~~~~~~~~~~~~
!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }'.
!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'.
@@ -67,13 +67,13 @@ var aDate: Date = new Date(12);
>aDate : Date
>Date : Date
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var anObject: Object = new Object();
>anObject : Object
>Object : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
var anAny: any = null;
>anAny : any
@@ -66,12 +66,12 @@ var aString = 'this is a string';
var aDate = new Date(12);
>aDate : Date
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var anObject = new Object();
>anObject : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
var anAny = null;
>anAny : any
@@ -25,7 +25,7 @@ var x = 5;
var server = new Date();
>server : Date
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
export = server;
>server : server
@@ -25,7 +25,7 @@ var x = 5;
var server = new Date();
>server : Date
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
export = server;
>server : server
@@ -67,13 +67,13 @@ for(var aDate: Date = new Date(12);;){}
>aDate : Date
>Date : Date
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
for(var anObject: Object = new Object();;){}
>anObject : Object
>Object : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
for(var anAny: any = null;;){}
>anAny : any
@@ -118,7 +118,7 @@ for (var a: string[] = []; ;) { }
for (var a = new Array<string>(); ;) { }
>a : string[]
>new Array<string>() : string[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
for (var a: typeof a; ;) { }
>a : string[]
@@ -41,7 +41,7 @@ var r = foo(new Function());
>foo(new Function()) : Function
>foo : <T extends Function>(x: T) => T
>new Function() : Function
>Function : { (...args: string[]): Function; new (...args: string[]): Function; prototype: Function; }
>Function : FunctionConstructor
var r1 = foo((x) => x);
>r1 : (x: any) => any
@@ -4,5 +4,5 @@ function clone():number {
throw new Error("To be implemented");
>new Error("To be implemented") : Error
>Error : { (message?: string): Error; new (message?: string): Error; prototype: Error; }
>Error : ErrorConstructor
}
+1 -1
View File
@@ -13,7 +13,7 @@ salt.apply("hello", []);
>(new Function("return 5"))() : any
>(new Function("return 5")) : Function
>new Function("return 5") : Function
>Function : { (...args: string[]): Function; new (...args: string[]): Function; prototype: Function; }
>Function : FunctionConstructor
@@ -68,7 +68,7 @@ var r3 = utils.mapReduce(c, (x) => { return 1 }, (y) => { return new Date() });
>(y) => { return new Date() } : (y: number) => Date
>y : number
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var r4 = utils.mapReduce(c, (x: string) => { return 1 }, (y: number) => { return new Date() });
>r4 : Collection<Date>
@@ -82,7 +82,7 @@ var r4 = utils.mapReduce(c, (x: string) => { return 1 }, (y: number) => { return
>(y: number) => { return new Date() } : (y: number) => Date
>y : number
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var f1 = (x: string) => { return 1 };
>f1 : (x: string) => number
@@ -94,7 +94,7 @@ var f2 = (y: number) => { return new Date() };
>(y: number) => { return new Date() } : (y: number) => Date
>y : number
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var r5 = utils.mapReduce(c, f1, f2);
>r5 : Collection<Date>
@@ -9,7 +9,7 @@ function setFunc(v){}
Object.defineProperty({}, "0", <PropertyDescriptor>({
>Object.defineProperty({}, "0", <PropertyDescriptor>({ get: getFunc, set: setFunc, configurable: true })) : any
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
>{} : {}
><PropertyDescriptor>({ get: getFunc, set: setFunc, configurable: true }) : PropertyDescriptor
@@ -22,7 +22,7 @@ var e = [{}, Object]; // {}[]
>e : {}[]
>[{}, Object] : {}[]
>{} : {}
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
var f = [[], [1]]; // number[][]
>f : number[][]
@@ -1,5 +1,5 @@
//// [implementArrayInterface.ts]
declare class ArrayConstructor<T> implements Array<T> {
declare class MyArray<T> implements Array<T> {
toString(): string;
toLocaleString(): string;
concat<U extends T[]>(...items: U[]): T[];
@@ -1,6 +1,6 @@
=== tests/cases/compiler/implementArrayInterface.ts ===
declare class ArrayConstructor<T> implements Array<T> {
>ArrayConstructor : ArrayConstructor<T>
declare class MyArray<T> implements Array<T> {
>MyArray : MyArray<T>
>T : T
>Array : T[]
>T : T
@@ -4,7 +4,7 @@ Array.prototype.slice();
>Array.prototype.slice() : any[]
>Array.prototype.slice : (start?: number, end?: number) => any[]
>Array.prototype : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
>prototype : any[]
>slice : (start?: number, end?: number) => any[]
@@ -12,7 +12,7 @@ Array.prototype.slice(0);
>Array.prototype.slice(0) : any[]
>Array.prototype.slice : (start?: number, end?: number) => any[]
>Array.prototype : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
>prototype : any[]
>slice : (start?: number, end?: number) => any[]
@@ -20,7 +20,7 @@ Array.prototype.slice(0, 1);
>Array.prototype.slice(0, 1) : any[]
>Array.prototype.slice : (start?: number, end?: number) => any[]
>Array.prototype : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
>prototype : any[]
>slice : (start?: number, end?: number) => any[]
@@ -4,7 +4,7 @@
Date.prototype.constructor;
>Date.prototype.constructor : Function
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>constructor : Function
@@ -12,7 +12,7 @@ Date.prototype.toString();
>Date.prototype.toString() : string
>Date.prototype.toString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toString : () => string
@@ -20,7 +20,7 @@ Date.prototype.toDateString();
>Date.prototype.toDateString() : string
>Date.prototype.toDateString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toDateString : () => string
@@ -28,7 +28,7 @@ Date.prototype.toTimeString();
>Date.prototype.toTimeString() : string
>Date.prototype.toTimeString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toTimeString : () => string
@@ -36,7 +36,7 @@ Date.prototype.toLocaleString();
>Date.prototype.toLocaleString() : string
>Date.prototype.toLocaleString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toLocaleString : () => string
@@ -44,7 +44,7 @@ Date.prototype.toLocaleDateString();
>Date.prototype.toLocaleDateString() : string
>Date.prototype.toLocaleDateString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toLocaleDateString : () => string
@@ -52,7 +52,7 @@ Date.prototype.toLocaleTimeString();
>Date.prototype.toLocaleTimeString() : string
>Date.prototype.toLocaleTimeString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toLocaleTimeString : () => string
@@ -60,7 +60,7 @@ Date.prototype.valueOf();
>Date.prototype.valueOf() : number
>Date.prototype.valueOf : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>valueOf : () => number
@@ -68,7 +68,7 @@ Date.prototype.getTime();
>Date.prototype.getTime() : number
>Date.prototype.getTime : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getTime : () => number
@@ -76,7 +76,7 @@ Date.prototype.getFullYear();
>Date.prototype.getFullYear() : number
>Date.prototype.getFullYear : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getFullYear : () => number
@@ -84,7 +84,7 @@ Date.prototype.getUTCFullYear();
>Date.prototype.getUTCFullYear() : number
>Date.prototype.getUTCFullYear : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCFullYear : () => number
@@ -92,7 +92,7 @@ Date.prototype.getMonth();
>Date.prototype.getMonth() : number
>Date.prototype.getMonth : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getMonth : () => number
@@ -100,7 +100,7 @@ Date.prototype.getUTCMonth();
>Date.prototype.getUTCMonth() : number
>Date.prototype.getUTCMonth : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCMonth : () => number
@@ -108,7 +108,7 @@ Date.prototype.getDate();
>Date.prototype.getDate() : number
>Date.prototype.getDate : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getDate : () => number
@@ -116,7 +116,7 @@ Date.prototype.getUTCDate();
>Date.prototype.getUTCDate() : number
>Date.prototype.getUTCDate : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCDate : () => number
@@ -124,7 +124,7 @@ Date.prototype.getDay();
>Date.prototype.getDay() : number
>Date.prototype.getDay : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getDay : () => number
@@ -132,7 +132,7 @@ Date.prototype.getUTCDay();
>Date.prototype.getUTCDay() : number
>Date.prototype.getUTCDay : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCDay : () => number
@@ -140,7 +140,7 @@ Date.prototype.getHours();
>Date.prototype.getHours() : number
>Date.prototype.getHours : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getHours : () => number
@@ -148,7 +148,7 @@ Date.prototype.getUTCHours();
>Date.prototype.getUTCHours() : number
>Date.prototype.getUTCHours : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCHours : () => number
@@ -156,7 +156,7 @@ Date.prototype.getMinutes();
>Date.prototype.getMinutes() : number
>Date.prototype.getMinutes : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getMinutes : () => number
@@ -164,7 +164,7 @@ Date.prototype.getUTCMinutes();
>Date.prototype.getUTCMinutes() : number
>Date.prototype.getUTCMinutes : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCMinutes : () => number
@@ -172,7 +172,7 @@ Date.prototype.getSeconds();
>Date.prototype.getSeconds() : number
>Date.prototype.getSeconds : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getSeconds : () => number
@@ -180,7 +180,7 @@ Date.prototype.getUTCSeconds();
>Date.prototype.getUTCSeconds() : number
>Date.prototype.getUTCSeconds : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCSeconds : () => number
@@ -188,7 +188,7 @@ Date.prototype.getMilliseconds();
>Date.prototype.getMilliseconds() : number
>Date.prototype.getMilliseconds : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getMilliseconds : () => number
@@ -196,7 +196,7 @@ Date.prototype.getUTCMilliseconds();
>Date.prototype.getUTCMilliseconds() : number
>Date.prototype.getUTCMilliseconds : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getUTCMilliseconds : () => number
@@ -204,7 +204,7 @@ Date.prototype.getTimezoneOffset();
>Date.prototype.getTimezoneOffset() : number
>Date.prototype.getTimezoneOffset : () => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>getTimezoneOffset : () => number
@@ -212,7 +212,7 @@ Date.prototype.setTime(0);
>Date.prototype.setTime(0) : number
>Date.prototype.setTime : (time: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setTime : (time: number) => number
@@ -220,7 +220,7 @@ Date.prototype.setMilliseconds(0);
>Date.prototype.setMilliseconds(0) : number
>Date.prototype.setMilliseconds : (ms: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setMilliseconds : (ms: number) => number
@@ -228,7 +228,7 @@ Date.prototype.setUTCMilliseconds(0);
>Date.prototype.setUTCMilliseconds(0) : number
>Date.prototype.setUTCMilliseconds : (ms: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCMilliseconds : (ms: number) => number
@@ -236,7 +236,7 @@ Date.prototype.setSeconds(0);
>Date.prototype.setSeconds(0) : number
>Date.prototype.setSeconds : (sec: number, ms?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setSeconds : (sec: number, ms?: number) => number
@@ -244,7 +244,7 @@ Date.prototype.setUTCSeconds(0);
>Date.prototype.setUTCSeconds(0) : number
>Date.prototype.setUTCSeconds : (sec: number, ms?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCSeconds : (sec: number, ms?: number) => number
@@ -252,7 +252,7 @@ Date.prototype.setMinutes(0);
>Date.prototype.setMinutes(0) : number
>Date.prototype.setMinutes : (min: number, sec?: number, ms?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setMinutes : (min: number, sec?: number, ms?: number) => number
@@ -260,7 +260,7 @@ Date.prototype.setUTCMinutes(0);
>Date.prototype.setUTCMinutes(0) : number
>Date.prototype.setUTCMinutes : (min: number, sec?: number, ms?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCMinutes : (min: number, sec?: number, ms?: number) => number
@@ -268,7 +268,7 @@ Date.prototype.setHours(0);
>Date.prototype.setHours(0) : number
>Date.prototype.setHours : (hours: number, min?: number, sec?: number, ms?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setHours : (hours: number, min?: number, sec?: number, ms?: number) => number
@@ -276,7 +276,7 @@ Date.prototype.setUTCHours(0);
>Date.prototype.setUTCHours(0) : number
>Date.prototype.setUTCHours : (hours: number, min?: number, sec?: number, ms?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCHours : (hours: number, min?: number, sec?: number, ms?: number) => number
@@ -284,7 +284,7 @@ Date.prototype.setDate(0);
>Date.prototype.setDate(0) : number
>Date.prototype.setDate : (date: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setDate : (date: number) => number
@@ -292,7 +292,7 @@ Date.prototype.setUTCDate(0);
>Date.prototype.setUTCDate(0) : number
>Date.prototype.setUTCDate : (date: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCDate : (date: number) => number
@@ -300,7 +300,7 @@ Date.prototype.setMonth(0);
>Date.prototype.setMonth(0) : number
>Date.prototype.setMonth : (month: number, date?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setMonth : (month: number, date?: number) => number
@@ -308,7 +308,7 @@ Date.prototype.setUTCMonth(0);
>Date.prototype.setUTCMonth(0) : number
>Date.prototype.setUTCMonth : (month: number, date?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCMonth : (month: number, date?: number) => number
@@ -316,7 +316,7 @@ Date.prototype.setFullYear(0);
>Date.prototype.setFullYear(0) : number
>Date.prototype.setFullYear : (year: number, month?: number, date?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setFullYear : (year: number, month?: number, date?: number) => number
@@ -324,7 +324,7 @@ Date.prototype.setUTCFullYear(0);
>Date.prototype.setUTCFullYear(0) : number
>Date.prototype.setUTCFullYear : (year: number, month?: number, date?: number) => number
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>setUTCFullYear : (year: number, month?: number, date?: number) => number
@@ -332,7 +332,7 @@ Date.prototype.toUTCString();
>Date.prototype.toUTCString() : string
>Date.prototype.toUTCString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toUTCString : () => string
@@ -340,7 +340,7 @@ Date.prototype.toISOString();
>Date.prototype.toISOString() : string
>Date.prototype.toISOString : () => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toISOString : () => string
@@ -348,7 +348,7 @@ Date.prototype.toJSON(null);
>Date.prototype.toJSON(null) : string
>Date.prototype.toJSON : (key?: any) => string
>Date.prototype : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
>prototype : Date
>toJSON : (key?: any) => string
@@ -4,7 +4,7 @@
Object.prototype.constructor;
>Object.prototype.constructor : Function
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>constructor : Function
@@ -12,7 +12,7 @@ Object.prototype.toString();
>Object.prototype.toString() : string
>Object.prototype.toString : () => string
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>toString : () => string
@@ -20,7 +20,7 @@ Object.prototype.toLocaleString();
>Object.prototype.toLocaleString() : string
>Object.prototype.toLocaleString : () => string
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>toLocaleString : () => string
@@ -28,7 +28,7 @@ Object.prototype.valueOf();
>Object.prototype.valueOf() : Object
>Object.prototype.valueOf : () => Object
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>valueOf : () => Object
@@ -36,7 +36,7 @@ Object.prototype.hasOwnProperty("string");
>Object.prototype.hasOwnProperty("string") : boolean
>Object.prototype.hasOwnProperty : (v: string) => boolean
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>hasOwnProperty : (v: string) => boolean
@@ -44,16 +44,16 @@ Object.prototype.isPrototypeOf(Object);
>Object.prototype.isPrototypeOf(Object) : boolean
>Object.prototype.isPrototypeOf : (v: Object) => boolean
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>isPrototypeOf : (v: Object) => boolean
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
Object.prototype.propertyIsEnumerable("string");
>Object.prototype.propertyIsEnumerable("string") : boolean
>Object.prototype.propertyIsEnumerable : (v: string) => boolean
>Object.prototype : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>prototype : Object
>propertyIsEnumerable : (v: string) => boolean
@@ -4,7 +4,7 @@ String.prototype.slice();
>String.prototype.slice() : string
>String.prototype.slice : (start?: number, end?: number) => string
>String.prototype : String
>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; }
>String : StringConstructor
>prototype : String
>slice : (start?: number, end?: number) => string
@@ -12,7 +12,7 @@ String.prototype.slice(0);
>String.prototype.slice(0) : string
>String.prototype.slice : (start?: number, end?: number) => string
>String.prototype : String
>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; }
>String : StringConstructor
>prototype : String
>slice : (start?: number, end?: number) => string
@@ -20,7 +20,7 @@ String.prototype.slice(0,1);
>String.prototype.slice(0,1) : string
>String.prototype.slice : (start?: number, end?: number) => string
>String.prototype : String
>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; }
>String : StringConstructor
>prototype : String
>slice : (start?: number, end?: number) => string
+1 -1
View File
@@ -27,7 +27,7 @@ module M {
>this : Gar
>fa : Foo[]
>new Array<Foo>(this.x * this.y) : Foo[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
>Foo : Foo
>this.x * this.y : number
>this.x : number
@@ -51,13 +51,13 @@ var r4 = true ? new Date() : null;
>r4 : Date
>true ? new Date() : null : Date
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var r4 = true ? null : new Date();
>r4 : Date
>true ? null : new Date() : Date
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
var r5 = true ? /1/ : null;
>r5 : RegExp
@@ -281,13 +281,13 @@ var r19 = true ? new Object() : null;
>r19 : Object
>true ? new Object() : null : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
var r19 = true ? null : new Object();
>r19 : Object
>true ? null : new Object() : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
var r20 = true ? {} : null;
>r20 : {}
@@ -6,7 +6,7 @@
Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({
>Object.defineProperty(obj, "accProperty", <PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } })) : any
>Object.defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
>defineProperty : (o: any, p: string, attributes: PropertyDescriptor) => any
>obj : {}
><PropertyDescriptor>({ get: function () { eval("public = 1;"); return 11; }, set: function (v) { } }) : PropertyDescriptor
@@ -343,43 +343,43 @@ var r13 = i[-01]
>-01 : number
var b = {
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>{ "0.1": <void>null, ".1": new Object(), "1": 1, "1.": "", "1..": true, "1.0": new Date(), "-1.0": /123/, "-1": Date} : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
>{ "0.1": <void>null, ".1": new Object(), "1": 1, "1.": "", "1..": true, "1.0": new Date(), "-1.0": /123/, "-1": Date} : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
"0.1": <void>null,
><void>null : void
".1": new Object(),
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
"1": 1,
"1.": "",
"1..": true,
"1.0": new Date(),
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
"-1.0": /123/,
"-1": Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
};
var r1 = b['0.1'];
>r1 : void
>b['0.1'] : void
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
var r2 = b['.1'];
>r2 : Object
>b['.1'] : Object
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
var r3 = b['1'];
>r3 : number
>b['1'] : number
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
var r3 = c[1];
>r3 : number
@@ -389,7 +389,7 @@ var r3 = c[1];
var r4 = b['1.'];
>r4 : string
>b['1.'] : string
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
var r3 = c[1.]; // same as indexing by 1 when done numerically
>r3 : number
@@ -399,12 +399,12 @@ var r3 = c[1.]; // same as indexing by 1 when done numerically
var r5 = b['1..'];
>r5 : boolean
>b['1..'] : boolean
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
var r6 = b['1.0'];
>r6 : Date
>b['1.0'] : Date
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }; }
>b : { "1": number; "0.1": void; ".1": Object; "1.": string; "1..": boolean; "1.0": Date; "-1.0": RegExp; "-1": DateConstructor; }
var r3 = c[1.0]; // same as indexing by 1 when done numerically
>r3 : number
@@ -130,5 +130,5 @@ var r4 = b.foo(new Date());
>b : { foo: <T extends Date>(x: T) => number; }
>foo : <T extends Date>(x: T) => number
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
@@ -1,9 +1,9 @@
tests/cases/compiler/redefineArray.ts(1,1): error TS2322: Type '(n: number, s: string) => number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
tests/cases/compiler/redefineArray.ts(1,1): error TS2322: Type '(n: number, s: string) => number' is not assignable to type 'ArrayConstructor'.
Property 'isArray' is missing in type '(n: number, s: string) => number'.
==== tests/cases/compiler/redefineArray.ts (1 errors) ====
Array = function (n:number, s:string) {return n;};
~~~~~
!!! error TS2322: Type '(n: number, s: string) => number' is not assignable to type '{ (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }'.
!!! error TS2322: Type '(n: number, s: string) => number' is not assignable to type 'ArrayConstructor'.
!!! error TS2322: Property 'isArray' is missing in type '(n: number, s: string) => number'.
@@ -20,7 +20,7 @@ function fn6(): Date { return new Date(12); }
>fn6 : () => Date
>Date : Date
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
function fn7(): any { return null; }
>fn7 : () => any
@@ -16,7 +16,7 @@ module M1 {
>Array.prototype.reduce.apply : (thisArg: any, argArray?: any) => any
>Array.prototype.reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; <U>(callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; }
>Array.prototype : any[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
>prototype : any[]
>reduce : { (callbackfn: (previousValue: any, currentValue: any, currentIndex: number, array: any[]) => any, initialValue?: any): any; <U>(callbackfn: (previousValue: U, currentValue: any, currentIndex: number, array: any[]) => U, initialValue: U): U; }
>apply : (thisArg: any, argArray?: any) => any
@@ -35,7 +35,7 @@ try
throw new Error();
>new Error() : Error
>Error : { (message?: string): Error; new (message?: string): Error; prototype: Error; }
>Error : ErrorConstructor
}
catch (e)
>e : any
@@ -24,7 +24,7 @@ var r = f({ s: new Object() }); // ok
>{ s: new Object() } : { s: Object; }
>s : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
r.s && r.s.toFixed(); // would blow up at runtime
>r.s && r.s.toFixed() : string
@@ -25,11 +25,11 @@ switch (x) {
case new Date(12):
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
case new Object():
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
case /[a-z]/:
case[]:
@@ -111,11 +111,11 @@ switch (undefined) { }
switch (new Date(12)) { }
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
switch (new Object()) { }
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
switch (/[a-z]/) { }
switch ([]) { }
@@ -2,5 +2,5 @@
var x = `abc${ new String("Hi") }def`;
>x : string
>new String("Hi") : String
>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; }
>String : StringConstructor
@@ -2,5 +2,5 @@
var x = `abc${ new String("Hi") }def`;
>x : string
>new String("Hi") : String
>String : { (value?: any): string; new (value?: any): String; prototype: String; fromCharCode(...codes: number[]): string; }
>String : StringConstructor
@@ -1,5 +1,5 @@
tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(10,3): error TS1159: Tagged templates are only available when targeting ECMAScript 6 and higher.
lib.d.ts(502,11): error TS2300: Duplicate identifier 'TemplateStringsArray'.
lib.d.ts(513,11): error TS2300: Duplicate identifier 'TemplateStringsArray'.
tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(2,7): error TS2300: Duplicate identifier 'TemplateStringsArray'.
tests/cases/compiler/templateStringsArrayTypeDefinedInES5Mode.ts(8,3): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'TemplateStringsArray'.
Property 'raw' is missing in type '{ [x: number]: undefined; }'.
@@ -1,4 +1,4 @@
lib.d.ts(502,11): error TS2300: Duplicate identifier 'TemplateStringsArray'.
lib.d.ts(513,11): error TS2300: Duplicate identifier 'TemplateStringsArray'.
tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(2,7): error TS2300: Duplicate identifier 'TemplateStringsArray'.
tests/cases/compiler/templateStringsArrayTypeRedefinedInES6Mode.ts(8,3): error TS2345: Argument of type '{ [x: number]: undefined; }' is not assignable to parameter of type 'TemplateStringsArray'.
Property 'raw' is missing in type '{ [x: number]: undefined; }'.
@@ -74,7 +74,7 @@ throw aString;
var aDate = new Date(12);
>aDate : Date
>new Date(12) : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
throw aDate;
>aDate : Date
@@ -82,7 +82,7 @@ throw aDate;
var anObject = new Object();
>anObject : Object
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
throw anObject;
>anObject : Object
@@ -225,7 +225,7 @@ throw ['a', ['b']];
throw /[a-z]/;
throw new Date();
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
throw new C();
>new C() : C
@@ -233,7 +233,7 @@ throw new C();
throw new Object();
>new Object() : Object
>Object : { (): any; (value: any): any; new (value?: any): Object; prototype: Object; getPrototypeOf(o: any): any; getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor; getOwnPropertyNames(o: any): string[]; create(o: any, properties?: PropertyDescriptorMap): any; defineProperty(o: any, p: string, attributes: PropertyDescriptor): any; defineProperties(o: any, properties: PropertyDescriptorMap): any; seal(o: any): any; freeze(o: any): any; preventExtensions(o: any): any; isSealed(o: any): boolean; isFrozen(o: any): boolean; isExtensible(o: any): boolean; keys(o: any): string[]; }
>Object : ObjectConstructor
throw new D<number>();
>new D<number>() : D<number>
+260
View File
@@ -0,0 +1,260 @@
//// [typedArrays.ts]
function CreateTypedArrayTypes() {
var typedArrays = [];
typedArrays[0] = Int8Array;
typedArrays[1] = Uint8Array;
typedArrays[2] = Int16Array;
typedArrays[3] = Uint16Array;
typedArrays[4] = Int32Array;
typedArrays[5] = Uint32Array;
typedArrays[6] = Float32Array;
typedArrays[7] = Float64Array;
typedArrays[8] = Uint8ClampedArray;
return typedArrays;
}
function CreateTypedArrayInstancesFromLength(obj: number) {
var typedArrays = [];
typedArrays[0] = new Int8Array(obj);
typedArrays[1] = new Uint8Array(obj);
typedArrays[2] = new Int16Array(obj);
typedArrays[3] = new Uint16Array(obj);
typedArrays[4] = new Int32Array(obj);
typedArrays[5] = new Uint32Array(obj);
typedArrays[6] = new Float32Array(obj);
typedArrays[7] = new Float64Array(obj);
typedArrays[8] = new Uint8ClampedArray(obj);
return typedArrays;
}
function CreateTypedArrayInstancesFromArray(obj: number[]) {
var typedArrays = [];
typedArrays[0] = new Int8Array(obj);
typedArrays[1] = new Uint8Array(obj);
typedArrays[2] = new Int16Array(obj);
typedArrays[3] = new Uint16Array(obj);
typedArrays[4] = new Int32Array(obj);
typedArrays[5] = new Uint32Array(obj);
typedArrays[6] = new Float32Array(obj);
typedArrays[7] = new Float64Array(obj);
typedArrays[8] = new Uint8ClampedArray(obj);
return typedArrays;
}
function CreateIntegerTypedArraysFromArray2(obj:number[]) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj);
typedArrays[1] = Uint8Array.from(obj);
typedArrays[2] = Int16Array.from(obj);
typedArrays[3] = Uint16Array.from(obj);
typedArrays[4] = Int32Array.from(obj);
typedArrays[5] = Uint32Array.from(obj);
typedArrays[6] = Float32Array.from(obj);
typedArrays[7] = Float64Array.from(obj);
typedArrays[8] = Uint8ClampedArray.from(obj);
return typedArrays;
}
function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike<number>) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj);
typedArrays[1] = Uint8Array.from(obj);
typedArrays[2] = Int16Array.from(obj);
typedArrays[3] = Uint16Array.from(obj);
typedArrays[4] = Int32Array.from(obj);
typedArrays[5] = Uint32Array.from(obj);
typedArrays[6] = Float32Array.from(obj);
typedArrays[7] = Float64Array.from(obj);
typedArrays[8] = Uint8ClampedArray.from(obj);
return typedArrays;
}
/*
function CreateTypedArraysOf(obj) {
var typedArrays = [];
typedArrays[0] = Int8Array.of(...obj);
typedArrays[1] = Uint8Array.of(...obj);
typedArrays[2] = Int16Array.of(...obj);
typedArrays[3] = Uint16Array.of(...obj);
typedArrays[4] = Int32Array.of(...obj);
typedArrays[5] = Uint32Array.of(...obj);
typedArrays[6] = Float32Array.of(...obj);
typedArrays[7] = Float64Array.of(...obj);
typedArrays[8] = Uint8ClampedArray.of(...obj);
return typedArrays;
}
*/
function CreateTypedArraysOf2() {
var typedArrays = [];
typedArrays[0] = Int8Array.of(1,2,3,4);
typedArrays[1] = Uint8Array.of(1,2,3,4);
typedArrays[2] = Int16Array.of(1,2,3,4);
typedArrays[3] = Uint16Array.of(1,2,3,4);
typedArrays[4] = Int32Array.of(1,2,3,4);
typedArrays[5] = Uint32Array.of(1,2,3,4);
typedArrays[6] = Float32Array.of(1,2,3,4);
typedArrays[7] = Float64Array.of(1,2,3,4);
typedArrays[8] = Uint8ClampedArray.of(1,2,3,4);
return typedArrays;
}
function CreateTypedArraysFromMapFn(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj, mapFn);
typedArrays[1] = Uint8Array.from(obj, mapFn);
typedArrays[2] = Int16Array.from(obj, mapFn);
typedArrays[3] = Uint16Array.from(obj, mapFn);
typedArrays[4] = Int32Array.from(obj, mapFn);
typedArrays[5] = Uint32Array.from(obj, mapFn);
typedArrays[6] = Float32Array.from(obj, mapFn);
typedArrays[7] = Float64Array.from(obj, mapFn);
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn);
return typedArrays;
}
function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number, thisArg: {}) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj, mapFn, thisArg);
typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg);
typedArrays[2] = Int16Array.from(obj, mapFn, thisArg);
typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg);
typedArrays[4] = Int32Array.from(obj, mapFn, thisArg);
typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg);
typedArrays[6] = Float32Array.from(obj, mapFn, thisArg);
typedArrays[7] = Float64Array.from(obj, mapFn, thisArg);
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg);
return typedArrays;
}
//// [typedArrays.js]
function CreateTypedArrayTypes() {
var typedArrays = [];
typedArrays[0] = Int8Array;
typedArrays[1] = Uint8Array;
typedArrays[2] = Int16Array;
typedArrays[3] = Uint16Array;
typedArrays[4] = Int32Array;
typedArrays[5] = Uint32Array;
typedArrays[6] = Float32Array;
typedArrays[7] = Float64Array;
typedArrays[8] = Uint8ClampedArray;
return typedArrays;
}
function CreateTypedArrayInstancesFromLength(obj) {
var typedArrays = [];
typedArrays[0] = new Int8Array(obj);
typedArrays[1] = new Uint8Array(obj);
typedArrays[2] = new Int16Array(obj);
typedArrays[3] = new Uint16Array(obj);
typedArrays[4] = new Int32Array(obj);
typedArrays[5] = new Uint32Array(obj);
typedArrays[6] = new Float32Array(obj);
typedArrays[7] = new Float64Array(obj);
typedArrays[8] = new Uint8ClampedArray(obj);
return typedArrays;
}
function CreateTypedArrayInstancesFromArray(obj) {
var typedArrays = [];
typedArrays[0] = new Int8Array(obj);
typedArrays[1] = new Uint8Array(obj);
typedArrays[2] = new Int16Array(obj);
typedArrays[3] = new Uint16Array(obj);
typedArrays[4] = new Int32Array(obj);
typedArrays[5] = new Uint32Array(obj);
typedArrays[6] = new Float32Array(obj);
typedArrays[7] = new Float64Array(obj);
typedArrays[8] = new Uint8ClampedArray(obj);
return typedArrays;
}
function CreateIntegerTypedArraysFromArray2(obj) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj);
typedArrays[1] = Uint8Array.from(obj);
typedArrays[2] = Int16Array.from(obj);
typedArrays[3] = Uint16Array.from(obj);
typedArrays[4] = Int32Array.from(obj);
typedArrays[5] = Uint32Array.from(obj);
typedArrays[6] = Float32Array.from(obj);
typedArrays[7] = Float64Array.from(obj);
typedArrays[8] = Uint8ClampedArray.from(obj);
return typedArrays;
}
function CreateIntegerTypedArraysFromArrayLike(obj) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj);
typedArrays[1] = Uint8Array.from(obj);
typedArrays[2] = Int16Array.from(obj);
typedArrays[3] = Uint16Array.from(obj);
typedArrays[4] = Int32Array.from(obj);
typedArrays[5] = Uint32Array.from(obj);
typedArrays[6] = Float32Array.from(obj);
typedArrays[7] = Float64Array.from(obj);
typedArrays[8] = Uint8ClampedArray.from(obj);
return typedArrays;
}
/*
function CreateTypedArraysOf(obj) {
var typedArrays = [];
typedArrays[0] = Int8Array.of(...obj);
typedArrays[1] = Uint8Array.of(...obj);
typedArrays[2] = Int16Array.of(...obj);
typedArrays[3] = Uint16Array.of(...obj);
typedArrays[4] = Int32Array.of(...obj);
typedArrays[5] = Uint32Array.of(...obj);
typedArrays[6] = Float32Array.of(...obj);
typedArrays[7] = Float64Array.of(...obj);
typedArrays[8] = Uint8ClampedArray.of(...obj);
return typedArrays;
}
*/
function CreateTypedArraysOf2() {
var typedArrays = [];
typedArrays[0] = Int8Array.of(1, 2, 3, 4);
typedArrays[1] = Uint8Array.of(1, 2, 3, 4);
typedArrays[2] = Int16Array.of(1, 2, 3, 4);
typedArrays[3] = Uint16Array.of(1, 2, 3, 4);
typedArrays[4] = Int32Array.of(1, 2, 3, 4);
typedArrays[5] = Uint32Array.of(1, 2, 3, 4);
typedArrays[6] = Float32Array.of(1, 2, 3, 4);
typedArrays[7] = Float64Array.of(1, 2, 3, 4);
typedArrays[8] = Uint8ClampedArray.of(1, 2, 3, 4);
return typedArrays;
}
function CreateTypedArraysFromMapFn(obj, mapFn) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj, mapFn);
typedArrays[1] = Uint8Array.from(obj, mapFn);
typedArrays[2] = Int16Array.from(obj, mapFn);
typedArrays[3] = Uint16Array.from(obj, mapFn);
typedArrays[4] = Int32Array.from(obj, mapFn);
typedArrays[5] = Uint32Array.from(obj, mapFn);
typedArrays[6] = Float32Array.from(obj, mapFn);
typedArrays[7] = Float64Array.from(obj, mapFn);
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn);
return typedArrays;
}
function CreateTypedArraysFromThisObj(obj, mapFn, thisArg) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj, mapFn, thisArg);
typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg);
typedArrays[2] = Int16Array.from(obj, mapFn, thisArg);
typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg);
typedArrays[4] = Int32Array.from(obj, mapFn, thisArg);
typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg);
typedArrays[6] = Float32Array.from(obj, mapFn, thisArg);
typedArrays[7] = Float64Array.from(obj, mapFn, thisArg);
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg);
return typedArrays;
}
+788
View File
@@ -0,0 +1,788 @@
=== tests/cases/compiler/typedArrays.ts ===
function CreateTypedArrayTypes() {
>CreateTypedArrayTypes : () => any[]
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = Int8Array;
>typedArrays[0] = Int8Array : Int8ArrayConstructor
>typedArrays[0] : any
>typedArrays : any[]
>Int8Array : Int8ArrayConstructor
typedArrays[1] = Uint8Array;
>typedArrays[1] = Uint8Array : Uint8ArrayConstructor
>typedArrays[1] : any
>typedArrays : any[]
>Uint8Array : Uint8ArrayConstructor
typedArrays[2] = Int16Array;
>typedArrays[2] = Int16Array : Int16ArrayConstructor
>typedArrays[2] : any
>typedArrays : any[]
>Int16Array : Int16ArrayConstructor
typedArrays[3] = Uint16Array;
>typedArrays[3] = Uint16Array : Uint16ArrayConstructor
>typedArrays[3] : any
>typedArrays : any[]
>Uint16Array : Uint16ArrayConstructor
typedArrays[4] = Int32Array;
>typedArrays[4] = Int32Array : Int32ArrayConstructor
>typedArrays[4] : any
>typedArrays : any[]
>Int32Array : Int32ArrayConstructor
typedArrays[5] = Uint32Array;
>typedArrays[5] = Uint32Array : Uint32ArrayConstructor
>typedArrays[5] : any
>typedArrays : any[]
>Uint32Array : Uint32ArrayConstructor
typedArrays[6] = Float32Array;
>typedArrays[6] = Float32Array : Float32ArrayConstructor
>typedArrays[6] : any
>typedArrays : any[]
>Float32Array : Float32ArrayConstructor
typedArrays[7] = Float64Array;
>typedArrays[7] = Float64Array : Float64ArrayConstructor
>typedArrays[7] : any
>typedArrays : any[]
>Float64Array : Float64ArrayConstructor
typedArrays[8] = Uint8ClampedArray;
>typedArrays[8] = Uint8ClampedArray : Uint8ClampedArrayConstructor
>typedArrays[8] : any
>typedArrays : any[]
>Uint8ClampedArray : Uint8ClampedArrayConstructor
return typedArrays;
>typedArrays : any[]
}
function CreateTypedArrayInstancesFromLength(obj: number) {
>CreateTypedArrayInstancesFromLength : (obj: number) => any[]
>obj : number
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = new Int8Array(obj);
>typedArrays[0] = new Int8Array(obj) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>new Int8Array(obj) : Int8Array
>Int8Array : Int8ArrayConstructor
>obj : number
typedArrays[1] = new Uint8Array(obj);
>typedArrays[1] = new Uint8Array(obj) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>new Uint8Array(obj) : Uint8Array
>Uint8Array : Uint8ArrayConstructor
>obj : number
typedArrays[2] = new Int16Array(obj);
>typedArrays[2] = new Int16Array(obj) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>new Int16Array(obj) : Int16Array
>Int16Array : Int16ArrayConstructor
>obj : number
typedArrays[3] = new Uint16Array(obj);
>typedArrays[3] = new Uint16Array(obj) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>new Uint16Array(obj) : Uint16Array
>Uint16Array : Uint16ArrayConstructor
>obj : number
typedArrays[4] = new Int32Array(obj);
>typedArrays[4] = new Int32Array(obj) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>new Int32Array(obj) : Int32Array
>Int32Array : Int32ArrayConstructor
>obj : number
typedArrays[5] = new Uint32Array(obj);
>typedArrays[5] = new Uint32Array(obj) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>new Uint32Array(obj) : Uint32Array
>Uint32Array : Uint32ArrayConstructor
>obj : number
typedArrays[6] = new Float32Array(obj);
>typedArrays[6] = new Float32Array(obj) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>new Float32Array(obj) : Float32Array
>Float32Array : Float32ArrayConstructor
>obj : number
typedArrays[7] = new Float64Array(obj);
>typedArrays[7] = new Float64Array(obj) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>new Float64Array(obj) : Float64Array
>Float64Array : Float64ArrayConstructor
>obj : number
typedArrays[8] = new Uint8ClampedArray(obj);
>typedArrays[8] = new Uint8ClampedArray(obj) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>new Uint8ClampedArray(obj) : Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>obj : number
return typedArrays;
>typedArrays : any[]
}
function CreateTypedArrayInstancesFromArray(obj: number[]) {
>CreateTypedArrayInstancesFromArray : (obj: number[]) => any[]
>obj : number[]
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = new Int8Array(obj);
>typedArrays[0] = new Int8Array(obj) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>new Int8Array(obj) : Int8Array
>Int8Array : Int8ArrayConstructor
>obj : number[]
typedArrays[1] = new Uint8Array(obj);
>typedArrays[1] = new Uint8Array(obj) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>new Uint8Array(obj) : Uint8Array
>Uint8Array : Uint8ArrayConstructor
>obj : number[]
typedArrays[2] = new Int16Array(obj);
>typedArrays[2] = new Int16Array(obj) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>new Int16Array(obj) : Int16Array
>Int16Array : Int16ArrayConstructor
>obj : number[]
typedArrays[3] = new Uint16Array(obj);
>typedArrays[3] = new Uint16Array(obj) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>new Uint16Array(obj) : Uint16Array
>Uint16Array : Uint16ArrayConstructor
>obj : number[]
typedArrays[4] = new Int32Array(obj);
>typedArrays[4] = new Int32Array(obj) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>new Int32Array(obj) : Int32Array
>Int32Array : Int32ArrayConstructor
>obj : number[]
typedArrays[5] = new Uint32Array(obj);
>typedArrays[5] = new Uint32Array(obj) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>new Uint32Array(obj) : Uint32Array
>Uint32Array : Uint32ArrayConstructor
>obj : number[]
typedArrays[6] = new Float32Array(obj);
>typedArrays[6] = new Float32Array(obj) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>new Float32Array(obj) : Float32Array
>Float32Array : Float32ArrayConstructor
>obj : number[]
typedArrays[7] = new Float64Array(obj);
>typedArrays[7] = new Float64Array(obj) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>new Float64Array(obj) : Float64Array
>Float64Array : Float64ArrayConstructor
>obj : number[]
typedArrays[8] = new Uint8ClampedArray(obj);
>typedArrays[8] = new Uint8ClampedArray(obj) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>new Uint8ClampedArray(obj) : Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>obj : number[]
return typedArrays;
>typedArrays : any[]
}
function CreateIntegerTypedArraysFromArray2(obj:number[]) {
>CreateIntegerTypedArraysFromArray2 : (obj: number[]) => any[]
>obj : number[]
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = Int8Array.from(obj);
>typedArrays[0] = Int8Array.from(obj) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>Int8Array.from(obj) : Int8Array
>Int8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>Int8Array : Int8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>obj : number[]
typedArrays[1] = Uint8Array.from(obj);
>typedArrays[1] = Uint8Array.from(obj) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>Uint8Array.from(obj) : Uint8Array
>Uint8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>Uint8Array : Uint8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>obj : number[]
typedArrays[2] = Int16Array.from(obj);
>typedArrays[2] = Int16Array.from(obj) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>Int16Array.from(obj) : Int16Array
>Int16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>Int16Array : Int16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>obj : number[]
typedArrays[3] = Uint16Array.from(obj);
>typedArrays[3] = Uint16Array.from(obj) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>Uint16Array.from(obj) : Uint16Array
>Uint16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>Uint16Array : Uint16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>obj : number[]
typedArrays[4] = Int32Array.from(obj);
>typedArrays[4] = Int32Array.from(obj) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>Int32Array.from(obj) : Int32Array
>Int32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>Int32Array : Int32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>obj : number[]
typedArrays[5] = Uint32Array.from(obj);
>typedArrays[5] = Uint32Array.from(obj) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>Uint32Array.from(obj) : Uint32Array
>Uint32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>Uint32Array : Uint32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>obj : number[]
typedArrays[6] = Float32Array.from(obj);
>typedArrays[6] = Float32Array.from(obj) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>Float32Array.from(obj) : Float32Array
>Float32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>Float32Array : Float32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>obj : number[]
typedArrays[7] = Float64Array.from(obj);
>typedArrays[7] = Float64Array.from(obj) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>Float64Array.from(obj) : Float64Array
>Float64Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>Float64Array : Float64ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>obj : number[]
typedArrays[8] = Uint8ClampedArray.from(obj);
>typedArrays[8] = Uint8ClampedArray.from(obj) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>Uint8ClampedArray.from(obj) : Uint8ClampedArray
>Uint8ClampedArray.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>obj : number[]
return typedArrays;
>typedArrays : any[]
}
function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike<number>) {
>CreateIntegerTypedArraysFromArrayLike : (obj: ArrayLike<number>) => any[]
>obj : ArrayLike<number>
>ArrayLike : ArrayLike<T>
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = Int8Array.from(obj);
>typedArrays[0] = Int8Array.from(obj) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>Int8Array.from(obj) : Int8Array
>Int8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>Int8Array : Int8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>obj : ArrayLike<number>
typedArrays[1] = Uint8Array.from(obj);
>typedArrays[1] = Uint8Array.from(obj) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>Uint8Array.from(obj) : Uint8Array
>Uint8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>Uint8Array : Uint8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>obj : ArrayLike<number>
typedArrays[2] = Int16Array.from(obj);
>typedArrays[2] = Int16Array.from(obj) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>Int16Array.from(obj) : Int16Array
>Int16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>Int16Array : Int16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>obj : ArrayLike<number>
typedArrays[3] = Uint16Array.from(obj);
>typedArrays[3] = Uint16Array.from(obj) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>Uint16Array.from(obj) : Uint16Array
>Uint16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>Uint16Array : Uint16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>obj : ArrayLike<number>
typedArrays[4] = Int32Array.from(obj);
>typedArrays[4] = Int32Array.from(obj) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>Int32Array.from(obj) : Int32Array
>Int32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>Int32Array : Int32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>obj : ArrayLike<number>
typedArrays[5] = Uint32Array.from(obj);
>typedArrays[5] = Uint32Array.from(obj) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>Uint32Array.from(obj) : Uint32Array
>Uint32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>Uint32Array : Uint32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>obj : ArrayLike<number>
typedArrays[6] = Float32Array.from(obj);
>typedArrays[6] = Float32Array.from(obj) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>Float32Array.from(obj) : Float32Array
>Float32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>Float32Array : Float32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>obj : ArrayLike<number>
typedArrays[7] = Float64Array.from(obj);
>typedArrays[7] = Float64Array.from(obj) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>Float64Array.from(obj) : Float64Array
>Float64Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>Float64Array : Float64ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>obj : ArrayLike<number>
typedArrays[8] = Uint8ClampedArray.from(obj);
>typedArrays[8] = Uint8ClampedArray.from(obj) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>Uint8ClampedArray.from(obj) : Uint8ClampedArray
>Uint8ClampedArray.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>obj : ArrayLike<number>
return typedArrays;
>typedArrays : any[]
}
/*
function CreateTypedArraysOf(obj) {
var typedArrays = [];
typedArrays[0] = Int8Array.of(...obj);
typedArrays[1] = Uint8Array.of(...obj);
typedArrays[2] = Int16Array.of(...obj);
typedArrays[3] = Uint16Array.of(...obj);
typedArrays[4] = Int32Array.of(...obj);
typedArrays[5] = Uint32Array.of(...obj);
typedArrays[6] = Float32Array.of(...obj);
typedArrays[7] = Float64Array.of(...obj);
typedArrays[8] = Uint8ClampedArray.of(...obj);
return typedArrays;
}
*/
function CreateTypedArraysOf2() {
>CreateTypedArraysOf2 : () => any[]
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = Int8Array.of(1,2,3,4);
>typedArrays[0] = Int8Array.of(1,2,3,4) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>Int8Array.of(1,2,3,4) : Int8Array
>Int8Array.of : (...items: number[]) => Int8Array
>Int8Array : Int8ArrayConstructor
>of : (...items: number[]) => Int8Array
typedArrays[1] = Uint8Array.of(1,2,3,4);
>typedArrays[1] = Uint8Array.of(1,2,3,4) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>Uint8Array.of(1,2,3,4) : Uint8Array
>Uint8Array.of : (...items: number[]) => Uint8Array
>Uint8Array : Uint8ArrayConstructor
>of : (...items: number[]) => Uint8Array
typedArrays[2] = Int16Array.of(1,2,3,4);
>typedArrays[2] = Int16Array.of(1,2,3,4) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>Int16Array.of(1,2,3,4) : Int16Array
>Int16Array.of : (...items: number[]) => Int16Array
>Int16Array : Int16ArrayConstructor
>of : (...items: number[]) => Int16Array
typedArrays[3] = Uint16Array.of(1,2,3,4);
>typedArrays[3] = Uint16Array.of(1,2,3,4) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>Uint16Array.of(1,2,3,4) : Uint16Array
>Uint16Array.of : (...items: number[]) => Uint16Array
>Uint16Array : Uint16ArrayConstructor
>of : (...items: number[]) => Uint16Array
typedArrays[4] = Int32Array.of(1,2,3,4);
>typedArrays[4] = Int32Array.of(1,2,3,4) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>Int32Array.of(1,2,3,4) : Int32Array
>Int32Array.of : (...items: number[]) => Int32Array
>Int32Array : Int32ArrayConstructor
>of : (...items: number[]) => Int32Array
typedArrays[5] = Uint32Array.of(1,2,3,4);
>typedArrays[5] = Uint32Array.of(1,2,3,4) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>Uint32Array.of(1,2,3,4) : Uint32Array
>Uint32Array.of : (...items: number[]) => Uint32Array
>Uint32Array : Uint32ArrayConstructor
>of : (...items: number[]) => Uint32Array
typedArrays[6] = Float32Array.of(1,2,3,4);
>typedArrays[6] = Float32Array.of(1,2,3,4) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>Float32Array.of(1,2,3,4) : Float32Array
>Float32Array.of : (...items: number[]) => Float32Array
>Float32Array : Float32ArrayConstructor
>of : (...items: number[]) => Float32Array
typedArrays[7] = Float64Array.of(1,2,3,4);
>typedArrays[7] = Float64Array.of(1,2,3,4) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>Float64Array.of(1,2,3,4) : Float64Array
>Float64Array.of : (...items: number[]) => Float64Array
>Float64Array : Float64ArrayConstructor
>of : (...items: number[]) => Float64Array
typedArrays[8] = Uint8ClampedArray.of(1,2,3,4);
>typedArrays[8] = Uint8ClampedArray.of(1,2,3,4) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>Uint8ClampedArray.of(1,2,3,4) : Uint8ClampedArray
>Uint8ClampedArray.of : (...items: number[]) => Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>of : (...items: number[]) => Uint8ClampedArray
return typedArrays;
>typedArrays : any[]
}
function CreateTypedArraysFromMapFn(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number) {
>CreateTypedArraysFromMapFn : (obj: ArrayLike<number>, mapFn: (n: number, v: number) => number) => any[]
>obj : ArrayLike<number>
>ArrayLike : ArrayLike<T>
>mapFn : (n: number, v: number) => number
>n : number
>v : number
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = Int8Array.from(obj, mapFn);
>typedArrays[0] = Int8Array.from(obj, mapFn) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>Int8Array.from(obj, mapFn) : Int8Array
>Int8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>Int8Array : Int8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[1] = Uint8Array.from(obj, mapFn);
>typedArrays[1] = Uint8Array.from(obj, mapFn) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>Uint8Array.from(obj, mapFn) : Uint8Array
>Uint8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>Uint8Array : Uint8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[2] = Int16Array.from(obj, mapFn);
>typedArrays[2] = Int16Array.from(obj, mapFn) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>Int16Array.from(obj, mapFn) : Int16Array
>Int16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>Int16Array : Int16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[3] = Uint16Array.from(obj, mapFn);
>typedArrays[3] = Uint16Array.from(obj, mapFn) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>Uint16Array.from(obj, mapFn) : Uint16Array
>Uint16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>Uint16Array : Uint16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[4] = Int32Array.from(obj, mapFn);
>typedArrays[4] = Int32Array.from(obj, mapFn) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>Int32Array.from(obj, mapFn) : Int32Array
>Int32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>Int32Array : Int32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[5] = Uint32Array.from(obj, mapFn);
>typedArrays[5] = Uint32Array.from(obj, mapFn) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>Uint32Array.from(obj, mapFn) : Uint32Array
>Uint32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>Uint32Array : Uint32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[6] = Float32Array.from(obj, mapFn);
>typedArrays[6] = Float32Array.from(obj, mapFn) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>Float32Array.from(obj, mapFn) : Float32Array
>Float32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>Float32Array : Float32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[7] = Float64Array.from(obj, mapFn);
>typedArrays[7] = Float64Array.from(obj, mapFn) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>Float64Array.from(obj, mapFn) : Float64Array
>Float64Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>Float64Array : Float64ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn);
>typedArrays[8] = Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>Uint8ClampedArray.from(obj, mapFn) : Uint8ClampedArray
>Uint8ClampedArray.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
return typedArrays;
>typedArrays : any[]
}
function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number, thisArg: {}) {
>CreateTypedArraysFromThisObj : (obj: ArrayLike<number>, mapFn: (n: number, v: number) => number, thisArg: {}) => any[]
>obj : ArrayLike<number>
>ArrayLike : ArrayLike<T>
>mapFn : (n: number, v: number) => number
>n : number
>v : number
>thisArg : {}
var typedArrays = [];
>typedArrays : any[]
>[] : undefined[]
typedArrays[0] = Int8Array.from(obj, mapFn, thisArg);
>typedArrays[0] = Int8Array.from(obj, mapFn, thisArg) : Int8Array
>typedArrays[0] : any
>typedArrays : any[]
>Int8Array.from(obj, mapFn, thisArg) : Int8Array
>Int8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>Int8Array : Int8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int8Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg);
>typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg) : Uint8Array
>typedArrays[1] : any
>typedArrays : any[]
>Uint8Array.from(obj, mapFn, thisArg) : Uint8Array
>Uint8Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>Uint8Array : Uint8ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[2] = Int16Array.from(obj, mapFn, thisArg);
>typedArrays[2] = Int16Array.from(obj, mapFn, thisArg) : Int16Array
>typedArrays[2] : any
>typedArrays : any[]
>Int16Array.from(obj, mapFn, thisArg) : Int16Array
>Int16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>Int16Array : Int16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int16Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg);
>typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg) : Uint16Array
>typedArrays[3] : any
>typedArrays : any[]
>Uint16Array.from(obj, mapFn, thisArg) : Uint16Array
>Uint16Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>Uint16Array : Uint16ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint16Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[4] = Int32Array.from(obj, mapFn, thisArg);
>typedArrays[4] = Int32Array.from(obj, mapFn, thisArg) : Int32Array
>typedArrays[4] : any
>typedArrays : any[]
>Int32Array.from(obj, mapFn, thisArg) : Int32Array
>Int32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>Int32Array : Int32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Int32Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg);
>typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg) : Uint32Array
>typedArrays[5] : any
>typedArrays : any[]
>Uint32Array.from(obj, mapFn, thisArg) : Uint32Array
>Uint32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>Uint32Array : Uint32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint32Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[6] = Float32Array.from(obj, mapFn, thisArg);
>typedArrays[6] = Float32Array.from(obj, mapFn, thisArg) : Float32Array
>typedArrays[6] : any
>typedArrays : any[]
>Float32Array.from(obj, mapFn, thisArg) : Float32Array
>Float32Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>Float32Array : Float32ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float32Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[7] = Float64Array.from(obj, mapFn, thisArg);
>typedArrays[7] = Float64Array.from(obj, mapFn, thisArg) : Float64Array
>typedArrays[7] : any
>typedArrays : any[]
>Float64Array.from(obj, mapFn, thisArg) : Float64Array
>Float64Array.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>Float64Array : Float64ArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Float64Array
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg);
>typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray
>typedArrays[8] : any
>typedArrays : any[]
>Uint8ClampedArray.from(obj, mapFn, thisArg) : Uint8ClampedArray
>Uint8ClampedArray.from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>Uint8ClampedArray : Uint8ClampedArrayConstructor
>from : (arrayLike: ArrayLike<number> | Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any) => Uint8ClampedArray
>obj : ArrayLike<number>
>mapFn : (n: number, v: number) => number
>thisArg : {}
return typedArrays;
>typedArrays : any[]
}
@@ -635,7 +635,7 @@ var log = _.bind((message?: string, ...rest: string[]) => { }, Date);
>(message?: string, ...rest: string[]) => { } : (message?: string, ...rest: string[]) => void
>message : string
>rest : string[]
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
_.delay(log, 1000, 'logged later');
>_.delay(log, 1000, 'logged later') : number
@@ -1097,7 +1097,7 @@ _.isDate(new Date());
>_ : Underscore.Static
>isDate : (object: any) => boolean
>new Date() : Date
>Date : { (): string; new (): Date; new (value: number): Date; new (value: string): Date; new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date; prototype: Date; parse(s: string): number; UTC(year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): number; now(): number; }
>Date : DateConstructor
_.isRegExp(/moe/);
>_.isRegExp(/moe/) : boolean
@@ -126,7 +126,7 @@ var a: string[] = [];
var a = new Array<string>();
>a : string[]
>new Array<string>() : string[]
>Array : { (arrayLength?: number): any[]; <T>(arrayLength: number): T[]; <T>(...items: T[]): T[]; new (arrayLength?: number): any[]; new <T>(arrayLength: number): T[]; new <T>(...items: T[]): T[]; isArray(arg: any): boolean; prototype: any[]; }
>Array : ArrayConstructor
var a: typeof a;
>a : string[]
@@ -1,4 +1,4 @@
declare class ArrayConstructor<T> implements Array<T> {
declare class MyArray<T> implements Array<T> {
toString(): string;
toLocaleString(): string;
concat<U extends T[]>(...items: U[]): T[];
+138
View File
@@ -0,0 +1,138 @@
// @target: ES6
function CreateTypedArrayTypes() {
var typedArrays = [];
typedArrays[0] = Int8Array;
typedArrays[1] = Uint8Array;
typedArrays[2] = Int16Array;
typedArrays[3] = Uint16Array;
typedArrays[4] = Int32Array;
typedArrays[5] = Uint32Array;
typedArrays[6] = Float32Array;
typedArrays[7] = Float64Array;
typedArrays[8] = Uint8ClampedArray;
return typedArrays;
}
function CreateTypedArrayInstancesFromLength(obj: number) {
var typedArrays = [];
typedArrays[0] = new Int8Array(obj);
typedArrays[1] = new Uint8Array(obj);
typedArrays[2] = new Int16Array(obj);
typedArrays[3] = new Uint16Array(obj);
typedArrays[4] = new Int32Array(obj);
typedArrays[5] = new Uint32Array(obj);
typedArrays[6] = new Float32Array(obj);
typedArrays[7] = new Float64Array(obj);
typedArrays[8] = new Uint8ClampedArray(obj);
return typedArrays;
}
function CreateTypedArrayInstancesFromArray(obj: number[]) {
var typedArrays = [];
typedArrays[0] = new Int8Array(obj);
typedArrays[1] = new Uint8Array(obj);
typedArrays[2] = new Int16Array(obj);
typedArrays[3] = new Uint16Array(obj);
typedArrays[4] = new Int32Array(obj);
typedArrays[5] = new Uint32Array(obj);
typedArrays[6] = new Float32Array(obj);
typedArrays[7] = new Float64Array(obj);
typedArrays[8] = new Uint8ClampedArray(obj);
return typedArrays;
}
function CreateIntegerTypedArraysFromArray2(obj:number[]) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj);
typedArrays[1] = Uint8Array.from(obj);
typedArrays[2] = Int16Array.from(obj);
typedArrays[3] = Uint16Array.from(obj);
typedArrays[4] = Int32Array.from(obj);
typedArrays[5] = Uint32Array.from(obj);
typedArrays[6] = Float32Array.from(obj);
typedArrays[7] = Float64Array.from(obj);
typedArrays[8] = Uint8ClampedArray.from(obj);
return typedArrays;
}
function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike<number>) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj);
typedArrays[1] = Uint8Array.from(obj);
typedArrays[2] = Int16Array.from(obj);
typedArrays[3] = Uint16Array.from(obj);
typedArrays[4] = Int32Array.from(obj);
typedArrays[5] = Uint32Array.from(obj);
typedArrays[6] = Float32Array.from(obj);
typedArrays[7] = Float64Array.from(obj);
typedArrays[8] = Uint8ClampedArray.from(obj);
return typedArrays;
}
/*
function CreateTypedArraysOf(obj) {
var typedArrays = [];
typedArrays[0] = Int8Array.of(...obj);
typedArrays[1] = Uint8Array.of(...obj);
typedArrays[2] = Int16Array.of(...obj);
typedArrays[3] = Uint16Array.of(...obj);
typedArrays[4] = Int32Array.of(...obj);
typedArrays[5] = Uint32Array.of(...obj);
typedArrays[6] = Float32Array.of(...obj);
typedArrays[7] = Float64Array.of(...obj);
typedArrays[8] = Uint8ClampedArray.of(...obj);
return typedArrays;
}
*/
function CreateTypedArraysOf2() {
var typedArrays = [];
typedArrays[0] = Int8Array.of(1,2,3,4);
typedArrays[1] = Uint8Array.of(1,2,3,4);
typedArrays[2] = Int16Array.of(1,2,3,4);
typedArrays[3] = Uint16Array.of(1,2,3,4);
typedArrays[4] = Int32Array.of(1,2,3,4);
typedArrays[5] = Uint32Array.of(1,2,3,4);
typedArrays[6] = Float32Array.of(1,2,3,4);
typedArrays[7] = Float64Array.of(1,2,3,4);
typedArrays[8] = Uint8ClampedArray.of(1,2,3,4);
return typedArrays;
}
function CreateTypedArraysFromMapFn(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj, mapFn);
typedArrays[1] = Uint8Array.from(obj, mapFn);
typedArrays[2] = Int16Array.from(obj, mapFn);
typedArrays[3] = Uint16Array.from(obj, mapFn);
typedArrays[4] = Int32Array.from(obj, mapFn);
typedArrays[5] = Uint32Array.from(obj, mapFn);
typedArrays[6] = Float32Array.from(obj, mapFn);
typedArrays[7] = Float64Array.from(obj, mapFn);
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn);
return typedArrays;
}
function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number, thisArg: {}) {
var typedArrays = [];
typedArrays[0] = Int8Array.from(obj, mapFn, thisArg);
typedArrays[1] = Uint8Array.from(obj, mapFn, thisArg);
typedArrays[2] = Int16Array.from(obj, mapFn, thisArg);
typedArrays[3] = Uint16Array.from(obj, mapFn, thisArg);
typedArrays[4] = Int32Array.from(obj, mapFn, thisArg);
typedArrays[5] = Uint32Array.from(obj, mapFn, thisArg);
typedArrays[6] = Float32Array.from(obj, mapFn, thisArg);
typedArrays[7] = Float64Array.from(obj, mapFn, thisArg);
typedArrays[8] = Uint8ClampedArray.from(obj, mapFn, thisArg);
return typedArrays;
}
+367
View File
@@ -0,0 +1,367 @@
declare function $FAIL(message: any): void;
declare function $PRINT(message: any): void;
declare function accessorPropertyAttributesAreCorrect(obj: any, name: any, get: any, set: any, setVerifyHelpProp: any, enumerable: any, configurable: any): boolean;
declare function arrayContains(arr: any, expected: any): boolean;
declare function compareArray(aExpected: any, aActual: any): boolean;
declare function testRun(id: any, path: any, description: any, codeString: any, result: any, error: any): void;
declare var print: any;
declare function dataPropertyAttributesAreCorrect(obj: any, name: any, value: any, writable: any, enumerable: any, configurable: any): boolean;
declare var HoursPerDay: number;
declare var MinutesPerHour: number;
declare var SecondsPerMinute: number;
declare var msPerDay: number;
declare var msPerSecond: number;
declare var msPerMinute: number;
declare var msPerHour: number;
declare var date_1899_end: number;
declare var date_1900_start: number;
declare var date_1969_end: number;
declare var date_1970_start: number;
declare var date_1999_end: number;
declare var date_2000_start: number;
declare var date_2099_end: number;
declare var date_2100_start: number;
declare var $LocalTZ: any, $DST_start_month: any, $DST_start_sunday: any, $DST_start_hour: any, $DST_start_minutes: any, $DST_end_month: any, $DST_end_sunday: any, $DST_end_hour: any, $DST_end_minutes: any;
declare function Day(t: any): number;
declare function TimeWithinDay(t: any): number;
declare function DaysInYear(y: any): number;
declare function DayFromYear(y: any): number;
declare function TimeFromYear(y: any): number;
declare function YearFromTime(t: any): number;
declare function InLeapYear(t: any): number;
declare function DayWithinYear(t: any): number;
declare function MonthFromTime(t: any): number;
declare function DateFromTime(t: any): number;
declare function WeekDay(t: any): number;
declare var LocalTZA: number;
declare function DaysInMonth(m: any, leap: any): any;
declare function GetSundayInMonth(t: any, m: any, count: any): any;
declare function DaylightSavingTA(t: any): number;
declare function LocalTime(t: any): any;
declare function UTC(t: any): number;
declare function HourFromTime(t: any): number;
declare function MinFromTime(t: any): number;
declare function SecFromTime(t: any): number;
declare function msFromTime(t: any): number;
declare function MakeTime(hour: any, min: any, sec: any, ms: any): any;
declare function MakeDay(year: any, month: any, date: any): number;
declare function MakeDate(day: any, time: any): any;
declare function TimeClip(time: any): any;
declare function ConstructDate(year: any, month: any, date: any, hours: any, minutes: any, seconds: any, ms: any): any;
declare function __consolePrintHandle__(msg: any): void;
declare function fnExists(): boolean;
declare var __globalObject: any;
declare function fnGlobalObject(): any;
declare function testPrint(message: any): void;
/**
* It is not yet clear that runTestCase should pass the global object
* as the 'this' binding in the call to testcase.
*/
declare var runTestCase: (testcase: any) => void;
declare function assertTruthy(value: any): void;
/**
* falsy means we expect no error.
* truthy means we expect some error.
* A non-empty string means we expect an error whose .name is that string.
*/
declare var expectedErrorName: boolean;
/**
* What was thrown, or the string 'Falsy' if something falsy was thrown.
* null if test completed normally.
*/
declare var actualError: any;
declare function testStarted(expectedErrName: any): void;
declare function testFinished(): void;
declare function Presenter(): void;
declare var presenter: any;
declare var prec: any;
declare function isEqual(num1: any, num2: any): boolean;
declare function getPrecision(num: any): number;
declare function ToInteger(p: any): any;
declare function checkSequence<T>(arr: Promise<T>, message: string): void;
declare var objectStore: {
object: Object;
};
declare var functionStore: {
fun: () => string;
};
declare function createEmulatedProxy<T>(target: T, emulatedProps: any, success?: any): T;
declare function Section(parentSection: any, id: any, name: any): void;
declare var NotEarlyErrorString: string;
declare var EarlyErrorRePat: string;
declare var NotEarlyError: Error;
declare var $ERROR: any;
declare function BrowserRunner(): void;
declare function TestLoader(): void;
declare function Controller(): void;
declare var controller: any;
declare function isSiteDebugMode(): boolean;
/**
* @description Helper handler method for tagged string templates
*/
declare function testHandler(literals: any): string;
/**
* @description Tests that obj meets the requirements for built-in objects
* defined by the introduction of chapter 15 of the ECMAScript Language Specification.
* @param {Object} obj the object to be tested.
* @param {boolean} isFunction whether the specification describes obj as a function.
* @param {boolean} isConstructor whether the specification describes obj as a constructor.
* @param {String[]} properties an array with the names of the built-in properties of obj,
* excluding length, prototype, or properties with non-default attributes.
* @param {number} length for functions only: the length specified for the function
* or derived from the argument list.
* @author Norbert Lindenberg
*/
declare function testBuiltInObject(obj: any, isFunction: any, isConstructor: any, properties: any, length: any): boolean;
/**
* @description This is a helper file for testing detached typed arrays
* @author Andrei Borodin (anborod)
*/
declare var lib: {
init: () => void;
dispose: () => void;
detachItem: (item: any) => any;
createDetachCallback: (arr: any, detachAfterNumIterations: any, valueToReturn: any) => (item: any) => any;
createDetachValueOfObject: (arr: any, detachAfterNumIterations: any, value: any) => {
valueOf: () => any;
};
createDetachToStringObject: (arr: any, detachAfterNumIterations: any, value: any) => {
toString: () => string;
};
runTestCaseWrapper: (func: any) => void;
expectTypeError: (func: any, reason: any) => void;
expectRangeError: (func: any, reason: any) => void;
expectError: (errorType: any, name: any, func: any, reason: any) => void;
isDetached: (obj: any) => boolean;
};
declare function testIntlOptions(givenOptions: any, expectedOptions: any): void;
/**
* This file contains shared functions for the tests in the conformance test
* suite for the ECMAScript Internationalization API.
* @author Norbert Lindenberg
*/
/**
* @description Calls the provided function for every service constructor in
* the Intl object, until f returns a falsy value. It returns the result of the
* last call to f, mapped to a boolean.
* @param {Function} f the function to call for each service constructor in
* the Intl object.
* @param {Function} Constructor the constructor object to test with.
* @result {Boolean} whether the test succeeded.
*/
declare function testWithIntlConstructors(f: any): boolean;
/**
* Returns the name of the given constructor object, which must be one of
* Intl.Collator, Intl.NumberFormat, or Intl.DateTimeFormat.
* @param {object} Constructor a constructor
* @return {string} the name of the constructor
*/
declare function getConstructorName(Constructor: any): string;
/**
* Taints a named data property of the given object by installing
* a setter that throws an exception.
* @param {object} obj the object whose data property to taint
* @param {string} property the property to taint
*/
declare function taintDataProperty(obj: any, property: any): void;
/**
* Taints a named method of the given object by replacing it with a function
* that throws an exception.
* @param {object} obj the object whose method to taint
* @param {string} property the name of the method to taint
*/
declare function taintMethod(obj: any, property: any): void;
/**
* Taints the given properties (and similarly named properties) by installing
* setters on Object.prototype that throw exceptions.
* @param {Array} properties an array of property names to taint
*/
declare function taintProperties(properties: any): void;
/**
* Taints the Array object by creating a setter for the property "0" and
* replacing some key methods with functions that throw exceptions.
*/
declare function taintArray(): void;
declare var languages: string[];
declare var scripts: string[];
declare var countries: string[];
declare var localeSupportInfo: {};
/**
* Gets locale support info for the given constructor object, which must be one
* of Intl.Collator, Intl.NumberFormat, Intl.DateTimeFormat.
* @param {object} Constructor the constructor for which to get locale support info
* @return {object} locale support info with the following properties:
* supported: array of fully supported language tags
* byFallback: array of language tags that are supported through fallbacks
* unsupported: array of unsupported language tags
*/
declare function getLocaleSupportInfo(Constructor: any): any;
/**
* @description Tests whether locale is a String value representing a
* structurally valid and canonicalized BCP 47 language tag, as defined in
* sections 6.2.2 and 6.2.3 of the ECMAScript Internationalization API
* Specification.
* @param {String} locale the string to be tested.
* @result {Boolean} whether the test succeeded.
*/
declare function isCanonicalizedStructurallyValidLanguageTag(locale: any): boolean;
/**
* Tests whether the named options property is correctly handled by the given constructor.
* @param {object} Constructor the constructor to test.
* @param {string} property the name of the options property to test.
* @param {string} type the type that values of the property are expected to have
* @param {Array} [values] an array of allowed values for the property. Not needed for boolean.
* @param {any} fallback the fallback value that the property assumes if not provided.
* @param {object} testOptions additional options:
* @param {boolean} isOptional whether support for this property is optional for implementations.
* @param {boolean} noReturn whether the resulting value of the property is not returned.
* @param {boolean} isILD whether the resulting value of the property is implementation and locale dependent.
* @param {object} extra additional option to pass along, properties are value -> {option: value}.
* @return {boolean} whether the test succeeded.
*/
declare function testOption(Constructor: any, property: any, type: any, values: any, fallback: any, testOptions: any): boolean;
/**
* Tests whether the named property of the given object has a valid value
* and the default attributes of the properties of an object literal.
* @param {Object} obj the object to be tested.
* @param {string} property the name of the property
* @param {Function|Array} valid either a function that tests value for validity and returns a boolean,
* an array of valid values.
* @exception if the property has an invalid value.
*/
declare function testProperty(obj: any, property: any, valid: any): void;
/**
* Tests whether the named property of the given object, if present at all, has a valid value
* and the default attributes of the properties of an object literal.
* @param {Object} obj the object to be tested.
* @param {string} property the name of the property
* @param {Function|Array} valid either a function that tests value for validity and returns a boolean,
* an array of valid values.
* @exception if the property is present and has an invalid value.
*/
declare function mayHaveProperty(obj: any, property: any, valid: any): void;
/**
* Tests whether the given object has the named property with a valid value
* and the default attributes of the properties of an object literal.
* @param {Object} obj the object to be tested.
* @param {string} property the name of the property
* @param {Function|Array} valid either a function that tests value for validity and returns a boolean,
* an array of valid values.
* @exception if the property is missing or has an invalid value.
*/
declare function mustHaveProperty(obj: any, property: any, valid: any): void;
/**
* Tests whether the given object does not have the named property.
* @param {Object} obj the object to be tested.
* @param {string} property the name of the property
* @exception if the property is present.
*/
declare function mustNotHaveProperty(obj: any, property: any): void;
/**
* Properties of the RegExp constructor that may be affected by use of regular
* expressions, and the default values of these properties. Properties are from
* https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Deprecated_and_obsolete_features#RegExp_Properties
*/
declare var regExpProperties: string[];
declare var regExpPropertiesDefaultValues: any;
/**
* Tests that executing the provided function (which may use regular expressions
* in its implementation) does not create or modify unwanted properties on the
* RegExp constructor.
*/
declare function testForUnwantedRegExpChanges(testFunc: any): void;
/**
* Tests whether name is a valid BCP 47 numbering system name
* and not excluded from use in the ECMAScript Internationalization API.
* @param {string} name the name to be tested.
* @return {boolean} whether name is a valid BCP 47 numbering system name and
* allowed for use in the ECMAScript Internationalization API.
*/
declare function isValidNumberingSystem(name: any): boolean;
/**
* Provides the digits of numbering systems with simple digit mappings,
* as specified in 11.3.2.
*/
declare var numberingSystemDigits: {
arab: string;
arabext: string;
beng: string;
deva: string;
fullwide: string;
gujr: string;
guru: string;
hanidec: string;
khmr: string;
knda: string;
laoo: string;
latn: string;
mlym: string;
mong: string;
mymr: string;
orya: string;
tamldec: string;
telu: string;
thai: string;
tibt: string;
};
/**
* Tests that number formatting is handled correctly. The function checks that the
* digit sequences in formatted output are as specified, converted to the
* selected numbering system, and embedded in consistent localized patterns.
* @param {Array} locales the locales to be tested.
* @param {Array} numberingSystems the numbering systems to be tested.
* @param {Object} options the options to pass to Intl.NumberFormat. Options
* must include {useGrouping: false}, and must cause 1.1 to be formatted
* pre- and post-decimal digits.
* @param {Object} testData maps input data (in ES5 9.3.1 format) to expected output strings
* in unlocalized format with Western digits.
*/
declare function testNumberFormat(locales: any, numberingSystems: any, options: any, testData: any): void;
/**
* Return the components of date-time formats.
* @return {Array} an array with all date-time components.
*/
declare function getDateTimeComponents(): string[];
/**
* Return the valid values for the given date-time component, as specified
* by the table in section 12.1.1.
* @param {string} component a date-time component.
* @return {Array} an array with the valid values for the component.
*/
declare function getDateTimeComponentValues(component: any): any;
/**
* Tests that the given value is valid for the given date-time component.
* @param {string} component a date-time component.
* @param {string} value the value to be tested.
* @return {boolean} true if the test succeeds.
* @exception if the test fails.
*/
declare function testValidDateTimeComponentValue(component: any, value: any): boolean;
/**
* Verifies that the actual array matches the expected one in length, elements,
* and element order.
* @param {Array} expected the expected array.
* @param {Array} actual the actual array.
* @return {boolean} true if the test succeeds.
* @exception if the test fails.
*/
declare function testArraysAreSame(expected: any, actual: any): boolean;
/**
* @description Helper methods for TypedArrays
*/
declare function CreateTypedArrayTypes(): [typeof Int8Array, typeof Uint8Array, typeof Int16Array, typeof Uint16Array, typeof Int32Array, typeof Uint32Array, typeof Float32Array, typeof Float64Array, typeof Uint8ClampedArray];
declare function CreateTypedArrayInstances(obj: any): [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray];
declare function CreateIntegerTypedArrayTypes(): [typeof Int8Array, typeof Uint8Array, typeof Int16Array, typeof Uint16Array, typeof Int32Array, typeof Uint32Array, typeof Uint8ClampedArray];
declare function CreateIntegerTypedArrays(obj: any): [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Uint8ClampedArray];
declare function CreateTypedRedcuedSetOfArrayTypes(): [typeof Float64Array];
declare function CreateTypedRedcuedSetOfArrays(obj: any): [Float64Array];
declare function CreateTypedArraysFrom(obj: any): [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray];
declare function CreateTypedArraysOf(obj: any): [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray];
declare function CreateTypedArraysFromMapFn(obj: any, mapFn: any): [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray];
declare function CreateTypedArraysFromThisObj(obj: any, mapFn: any, thisArg: any): [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray];
declare function CreatestringsOf(obj: any): string[];
declare function CreateSignedTypedArrayInstances(obj: any): [Int8Array, Int16Array, Int32Array, Float32Array, Float64Array];
declare function CreateUnSignedTypedArrayInstances(obj: any): [Uint8Array, Uint16Array, Uint32Array, Uint8ClampedArray];
declare var $LOG: any;
declare var WScript: any;
declare var $DONE: any;