2014-07-13 01:04:16 +02:00
/ * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Copyright ( c ) Microsoft Corporation . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the "License" ) ; you may not use
this file except in compliance with the License . You may obtain a copy of the
License at http : //www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN * AS IS * BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND , EITHER EXPRESS OR IMPLIED , INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE , FITNESS FOR A PARTICULAR PURPOSE ,
MERCHANTABLITY OR NON - INFRINGEMENT .
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2016-10-19 17:27:49 +02:00
2014-07-13 01:04:16 +02:00
/// <reference no-default-lib="true"/>
2016-10-19 17:27:49 +02:00
2014-07-13 01:04:16 +02:00
/////////////////////////////
/// ECMAScript APIs
/////////////////////////////
2016-02-23 21:53:52 +01:00
declare const NaN : number ;
declare const Infinity : number ;
2014-07-13 01:04:16 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Evaluates JavaScript code and executes it .
2014-07-13 01:04:16 +02:00
* @param x A String value that contains valid JavaScript code .
* /
declare function eval ( x : string ) : any ;
/ * *
* Converts A string to an integer .
* @param s A string to convert into a number .
2016-05-20 13:05:56 +02:00
* @param radix A value between 2 and 36 that specifies the base of the number in numString .
2014-07-13 01:04:16 +02:00
* If this argument is not supplied , strings with a prefix of '0x' are considered hexadecimal .
* All other strings are considered decimal .
* /
declare function parseInt ( s : string , radix? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a string to a floating - point number .
* @param string A string that contains a floating - point number .
2014-07-13 01:04:16 +02:00
* /
declare function parseFloat ( string : string ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns a Boolean value that indicates whether a value is the reserved value NaN ( not a number ) .
2014-07-13 01:04:16 +02:00
* @param number A numeric value .
* /
declare function isNaN ( number : number ) : boolean ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Determines whether a supplied number is finite .
* @param number Any numeric value .
* /
declare function isFinite ( number : number ) : boolean ;
/ * *
* Gets the unencoded version of an encoded Uniform Resource Identifier ( URI ) .
* @param encodedURI A value representing an encoded URI .
* /
declare function decodeURI ( encodedURI : string ) : string ;
/ * *
* Gets the unencoded version of an encoded component of a Uniform Resource Identifier ( URI ) .
* @param encodedURIComponent A value representing an encoded URI component .
* /
declare function decodeURIComponent ( encodedURIComponent : string ) : string ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Encodes a text string as a valid Uniform Resource Identifier ( URI )
* @param uri A value representing an encoded URI .
* /
declare function encodeURI ( uri : string ) : string ;
/ * *
* Encodes a text string as a valid component of a Uniform Resource Identifier ( URI ) .
* @param uriComponent A value representing an encoded URI component .
* /
declare function encodeURIComponent ( uriComponent : string ) : string ;
interface PropertyDescriptor {
configurable? : boolean ;
enumerable? : boolean ;
value? : any ;
writable? : boolean ;
get ? ( ) : any ;
set ? ( v : any ) : void ;
}
interface PropertyDescriptorMap {
[ s : string ] : PropertyDescriptor ;
}
interface Object {
/** The initial value of Object.prototype.constructor is the standard built-in Object constructor. */
constructor : Function ;
/** Returns a string representation of an object. */
toString ( ) : string ;
/** Returns a date converted to a string using the current locale. */
toLocaleString ( ) : string ;
/** Returns the primitive value of the specified object. */
valueOf ( ) : Object ;
/ * *
2016-05-20 13:05:56 +02:00
* Determines whether an object has a property with the specified name .
2014-07-13 01:04:16 +02:00
* @param v A property name .
* /
hasOwnProperty ( v : string ) : boolean ;
/ * *
2016-05-20 13:05:56 +02:00
* Determines whether an object exists in another object ' s prototype chain .
2014-07-13 01:04:16 +02:00
* @param v Another object whose prototype chain is to be checked .
* /
isPrototypeOf ( v : Object ) : boolean ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Determines whether a specified property is enumerable .
* @param v A property name .
* /
propertyIsEnumerable ( v : string ) : boolean ;
}
2014-12-12 23:16:35 +01:00
interface ObjectConstructor {
2014-07-13 01:04:16 +02:00
new ( value? : any ) : Object ;
( ) : any ;
( value : any ) : any ;
/** A reference to the prototype for a class of objects. */
2016-02-23 21:53:52 +01:00
readonly prototype : Object ;
2014-07-13 01:04:16 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the prototype of an object .
2014-07-13 01:04:16 +02:00
* @param o The object that references the prototype .
* /
getPrototypeOf ( o : any ) : any ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the own property descriptor of the specified object .
* An own property descriptor is one that is defined directly on the object and is not inherited from the object ' s prototype .
2014-07-13 01:04:16 +02:00
* @param o Object that contains the property .
* @param p Name of the property .
* /
getOwnPropertyDescriptor ( o : any , p : string ) : PropertyDescriptor ;
2016-05-20 13:05:56 +02:00
/ * *
* Returns the names of the own properties of an object . The own properties of an object are those that are defined directly
2014-07-13 01:04:16 +02:00
* on that object , and are not inherited from the object ' s prototype . The properties of an object include both fields ( objects ) and functions .
* @param o Object that contains the own properties .
* /
getOwnPropertyNames ( o : any ) : string [ ] ;
[Transforms] Merge master 06/06/2016 (#8991)
* Remove check narrowing only certain types, add test showing issues with this
* string literal case test
* Reconcile fix with CFA work
* Defaultable -> NotNarrowable to align with use
* Missed a defaultable in comments
* Add test for narrowing to unions of string literals
* Rewrite isInStringLiteral to accomodate for unterminated strings
* Refactor signatureHelp to expose helper functions
* Add support for completion in string literals
* Remove unused check
* Use const instead of let
* Fix error
* Formatting changes
* Use shorthand properties
* Add failing test for #8738
* Sort baseline reference identifier by name
* Detects assignment to internal module export clause, fixes #8738
* add SharedArrayBuffer
fix
* Factor out assignment op check
* Add test for composite assignment
* Factor out the behaviour and handles x++ and ++x
* Handles ES3 default as identifier name
* Fix missing else statement
* isNameOfExportedDeclarationInNonES6Module
* Reorder options alphabetically
* Mark diagnostics, and skipDefaultLibCheck as internal
* Allow an import of "foo.js" to be matched by a file "foo.ts"
* Improve loadModuleFromFile code
* Respond to PR comments
* Respond to more PR comments
* Fix test
* Actually merge from master
* Revert to old tryLoad implementation
* Run fixupParentReferences when parsing isolated jsDocComment
* initial revision of unit test support for project system in tsserver
* Allow wildcard ("*") patterns in ambient module declarations
* Add non-widening forms of null and undefined
* Create separate control flows for property declarations with initializers
* Add regression test
* Allow trailing commas in function parameter and argument lists
* Add tests
* Remove unused variable
* Add null check and CR feedback
* Support shorthand ambient module declarations
* Revert "Merge pull request #7235 from weswigham/narrow-all-types"
This reverts commit ef0f6c8fe4f94a7e294cfe42d7025c9dca6535d5, reversing
changes made to 9f087cb62ade7a879e23c229df752fc8f87d679c.
* reuse the fixupParentReferences function
* Improve typing of && operator with --strictNullChecks
* Add test
* Respond to PR comments
* Respond to PR comments
* Add merging tests
* Use a function `stringify` to simplify calls to `JSON.stringify(xyz, undefined, 2)`
* Update tests
* Fix mistake
* Include indent in navigation bar protocol
Previously navbar01 test had indents when run in the browser but not when run from node. Now they run the same.
* Remove unnecessary restrictions in property access narrowing
* Fix fourslash test
* Add regression test
* Consider property declarations to be control flow containers
* Adding regression test
* Remove restriction on --target es5 and --module es6
* change type definition for Object.create
* Fix signature help
* Add "implicit any" warning for shorthand ambient modules
* Remove trailing whitespace
* Support using string values in enums for CompilerOptions in transpile methods
* Remove trailing whitespace in jakefile
* Make `jake runtests-browser` support test regexes with spaces
For example: `jake runtests-browser t="transpile .js files"` now works.
* Add another test
* factor out isJsxOrTsxExtension
* Move to a conformance test
* Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-types""
This reverts commit fc3e040c5167868ed623612e8f33fb3beedf73b1.
* Use inclusive flag, as originally done, but include almost everything
* Add additional tests
* Respond to PR comments
* Fix typo
* add tests for tsserver project system
* Fix test
* Allow case comparison to undefined and null in strict null checking mode
* Remove incorrectly added tests
* check if moduleResolution when verifying that program can be reused
* more tests for module resolution change and exclude
* Fix linting issues
* Merge JSDoc of assignments from function expressions
* Allow nested assignments in type guards
* Add tests
* Improve order of parameter's merged jsdoc
* Force LF newlines for LKG builds/non debug builds
Fixes 6630
* Create intersection types in type guards for unrelated types
* Split commentsFunction test into expr/decl
And renumber.
* Remove TODO comments
* Accept new baselines
* Add tests
* Remove comments
* Fix test helper
* Recognize relative path using in outDir property (#9025)
* Recognize relative path using in outDir property
* Add projects tests
* Add project .json files
* Update baselines
* Add comments
* Add test case
The test passes in 1.8 and fails in master.
* Return trace when exception happens
* Remove Long-Done TODO
AFAIK, the harness sources have been concatenated into `run.js` for as long as I've known. This stops executing them twice (and in turn makes debugging tests much easier, since you no longer have to debug into eval'd code).
* Allow primitive type guards with typeof on right
Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.
* Primitive type guards are now order independent
* Fix comments in tests
* Add handleing for classes
* Add more tests for target=es5 module=es6
* addExportToArgumentListKind
* Accept baseline
* Add more tests
* wip-fixing transforms
* Adds progress indicators to the runtests-parallel build task.
* Fixed typo
* Fix comment
* Add test for out-of-range error
* Use proper method of not resolving alias
* Fix module loading error
(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)
* Port 8739
* Update tests
* Update baselines
* Contextually type return statement in async function
* Remove stale files
* Undo change
* Improve perf
* Improve tests
* Fix sourcemaps for debugging tests
* Allow --sourceRoot with --inlineSources option
Fixes #8445
* this in parameter initializers resolves to class
Accept baselines now that the test passes.
* Add tests for more kinds of import/export
* Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)
* Error when using async modifier in function-expression and arrow-function when target es5
* Add tests and baselines
* Resolve function-this in parameter initialisers when explicitly provided
* Allow null/undefined guard with null/undefined on left
Also add a test with baselines.
* Code review comments
* Update more diagnostic messages ES6->2015
Fix #8996 CC @mhegazy.
* Fixes an issue with runtests-parallel when global mocha is not installed.
* Update LKG
* Add tests
* fix baselines
* Recommend runtests-parallel in CONTRIBUTING
* Only inlineSourceMap when debugging through jake-browser (#9080)
* Only inlineSourceMap when debugging through jake-browser
* Address PR: fix typo in opt's property
* Manually port tests from PR 8470
* minor fix: add missing return clause
* Support using string values in enums for CompilerOptions in transpile methods
* Support using string values in enums for CompilerOptions in transpile methods
# Conflicts:
# tests/cases/unittests/transpile.ts
* Fix test helper
* Add test for out-of-range error
* Fix module loading error
(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)
* Use camel-case instead of snake-case (#9134)
* Manually add tests for PR 8988
* Allow wildcard ("*") patterns in ambient module declarations
* Respond to PR comments
* Add another test
* Improve perf
* Improve tests
* Update baseline from merging with master
* Address PR comment
* Update baseline
* Refactor how we retrieve binding-name cache in module transformer
* Temporary accept so we get a clean run-tests result
2016-06-14 20:36:57 +02:00
/ * *
* Creates an object that has null prototype .
* @param o Object to use as a prototype . May be null
* /
create ( o : null ) : any ;
/ * *
* Creates an object that has the specified prototype , and that optionally contains specified properties .
* @param o Object to use as a prototype . May be null
* /
create < T > ( o : T ) : T ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Creates an object that has the specified prototype , and that optionally contains specified properties .
* @param o Object to use as a prototype . May be null
2016-05-20 13:05:56 +02:00
* @param properties JavaScript object that contains one or more property descriptors .
2014-07-13 01:04:16 +02:00
* /
[Transforms] Merge master 06/06/2016 (#8991)
* Remove check narrowing only certain types, add test showing issues with this
* string literal case test
* Reconcile fix with CFA work
* Defaultable -> NotNarrowable to align with use
* Missed a defaultable in comments
* Add test for narrowing to unions of string literals
* Rewrite isInStringLiteral to accomodate for unterminated strings
* Refactor signatureHelp to expose helper functions
* Add support for completion in string literals
* Remove unused check
* Use const instead of let
* Fix error
* Formatting changes
* Use shorthand properties
* Add failing test for #8738
* Sort baseline reference identifier by name
* Detects assignment to internal module export clause, fixes #8738
* add SharedArrayBuffer
fix
* Factor out assignment op check
* Add test for composite assignment
* Factor out the behaviour and handles x++ and ++x
* Handles ES3 default as identifier name
* Fix missing else statement
* isNameOfExportedDeclarationInNonES6Module
* Reorder options alphabetically
* Mark diagnostics, and skipDefaultLibCheck as internal
* Allow an import of "foo.js" to be matched by a file "foo.ts"
* Improve loadModuleFromFile code
* Respond to PR comments
* Respond to more PR comments
* Fix test
* Actually merge from master
* Revert to old tryLoad implementation
* Run fixupParentReferences when parsing isolated jsDocComment
* initial revision of unit test support for project system in tsserver
* Allow wildcard ("*") patterns in ambient module declarations
* Add non-widening forms of null and undefined
* Create separate control flows for property declarations with initializers
* Add regression test
* Allow trailing commas in function parameter and argument lists
* Add tests
* Remove unused variable
* Add null check and CR feedback
* Support shorthand ambient module declarations
* Revert "Merge pull request #7235 from weswigham/narrow-all-types"
This reverts commit ef0f6c8fe4f94a7e294cfe42d7025c9dca6535d5, reversing
changes made to 9f087cb62ade7a879e23c229df752fc8f87d679c.
* reuse the fixupParentReferences function
* Improve typing of && operator with --strictNullChecks
* Add test
* Respond to PR comments
* Respond to PR comments
* Add merging tests
* Use a function `stringify` to simplify calls to `JSON.stringify(xyz, undefined, 2)`
* Update tests
* Fix mistake
* Include indent in navigation bar protocol
Previously navbar01 test had indents when run in the browser but not when run from node. Now they run the same.
* Remove unnecessary restrictions in property access narrowing
* Fix fourslash test
* Add regression test
* Consider property declarations to be control flow containers
* Adding regression test
* Remove restriction on --target es5 and --module es6
* change type definition for Object.create
* Fix signature help
* Add "implicit any" warning for shorthand ambient modules
* Remove trailing whitespace
* Support using string values in enums for CompilerOptions in transpile methods
* Remove trailing whitespace in jakefile
* Make `jake runtests-browser` support test regexes with spaces
For example: `jake runtests-browser t="transpile .js files"` now works.
* Add another test
* factor out isJsxOrTsxExtension
* Move to a conformance test
* Revert "Revert "Merge pull request #7235 from weswigham/narrow-all-types""
This reverts commit fc3e040c5167868ed623612e8f33fb3beedf73b1.
* Use inclusive flag, as originally done, but include almost everything
* Add additional tests
* Respond to PR comments
* Fix typo
* add tests for tsserver project system
* Fix test
* Allow case comparison to undefined and null in strict null checking mode
* Remove incorrectly added tests
* check if moduleResolution when verifying that program can be reused
* more tests for module resolution change and exclude
* Fix linting issues
* Merge JSDoc of assignments from function expressions
* Allow nested assignments in type guards
* Add tests
* Improve order of parameter's merged jsdoc
* Force LF newlines for LKG builds/non debug builds
Fixes 6630
* Create intersection types in type guards for unrelated types
* Split commentsFunction test into expr/decl
And renumber.
* Remove TODO comments
* Accept new baselines
* Add tests
* Remove comments
* Fix test helper
* Recognize relative path using in outDir property (#9025)
* Recognize relative path using in outDir property
* Add projects tests
* Add project .json files
* Update baselines
* Add comments
* Add test case
The test passes in 1.8 and fails in master.
* Return trace when exception happens
* Remove Long-Done TODO
AFAIK, the harness sources have been concatenated into `run.js` for as long as I've known. This stops executing them twice (and in turn makes debugging tests much easier, since you no longer have to debug into eval'd code).
* Allow primitive type guards with typeof on right
Previously, only type guards of the form `typeof x === 'string'` were
allowed. Now you can write `'string' === typeof x`.
* Primitive type guards are now order independent
* Fix comments in tests
* Add handleing for classes
* Add more tests for target=es5 module=es6
* addExportToArgumentListKind
* Accept baseline
* Add more tests
* wip-fixing transforms
* Adds progress indicators to the runtests-parallel build task.
* Fixed typo
* Fix comment
* Add test for out-of-range error
* Use proper method of not resolving alias
* Fix module loading error
(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)
* Port 8739
* Update tests
* Update baselines
* Contextually type return statement in async function
* Remove stale files
* Undo change
* Improve perf
* Improve tests
* Fix sourcemaps for debugging tests
* Allow --sourceRoot with --inlineSources option
Fixes #8445
* this in parameter initializers resolves to class
Accept baselines now that the test passes.
* Add tests for more kinds of import/export
* Fix7334 Disallow async in functionExpression and ArrowFunction (#9062)
* Error when using async modifier in function-expression and arrow-function when target es5
* Add tests and baselines
* Resolve function-this in parameter initialisers when explicitly provided
* Allow null/undefined guard with null/undefined on left
Also add a test with baselines.
* Code review comments
* Update more diagnostic messages ES6->2015
Fix #8996 CC @mhegazy.
* Fixes an issue with runtests-parallel when global mocha is not installed.
* Update LKG
* Add tests
* fix baselines
* Recommend runtests-parallel in CONTRIBUTING
* Only inlineSourceMap when debugging through jake-browser (#9080)
* Only inlineSourceMap when debugging through jake-browser
* Address PR: fix typo in opt's property
* Manually port tests from PR 8470
* minor fix: add missing return clause
* Support using string values in enums for CompilerOptions in transpile methods
* Support using string values in enums for CompilerOptions in transpile methods
# Conflicts:
# tests/cases/unittests/transpile.ts
* Fix test helper
* Add test for out-of-range error
* Fix module loading error
(commandLineOptions_stringToEnum would be undefined if optionDeclarations wasn't loaded yet)
* Use camel-case instead of snake-case (#9134)
* Manually add tests for PR 8988
* Allow wildcard ("*") patterns in ambient module declarations
* Respond to PR comments
* Add another test
* Improve perf
* Improve tests
* Update baseline from merging with master
* Address PR comment
* Update baseline
* Refactor how we retrieve binding-name cache in module transformer
* Temporary accept so we get a clean run-tests result
2016-06-14 20:36:57 +02:00
create ( o : any , properties : PropertyDescriptorMap ) : any ;
2014-07-13 01:04:16 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Adds a property to an object , or modifies attributes of an existing property .
2014-07-13 01:04:16 +02:00
* @param o Object on which to add or modify the property . This can be a native JavaScript object ( that is , a user - defined object or a built in object ) or a DOM object .
* @param p The property name .
* @param attributes Descriptor for the property . It can be for a data property or an accessor property .
* /
defineProperty ( o : any , p : string , attributes : PropertyDescriptor ) : any ;
/ * *
2016-05-20 13:05:56 +02:00
* Adds one or more properties to an object , and / or modifies attributes of existing properties .
2014-07-13 01:04:16 +02:00
* @param o Object on which to add or modify the properties . This can be a native JavaScript object or a DOM object .
* @param properties JavaScript object that contains one or more descriptor objects . Each descriptor object describes a data property or an accessor property .
* /
defineProperties ( o : any , properties : PropertyDescriptorMap ) : any ;
/ * *
* Prevents the modification of attributes of existing properties , and prevents the addition of new properties .
2016-05-20 13:05:56 +02:00
* @param o Object on which to lock the attributes .
2014-07-13 01:04:16 +02:00
* /
2015-03-13 00:12:22 +01:00
seal < T > ( o : T ) : T ;
2014-07-13 01:04:16 +02:00
/ * *
* Prevents the modification of existing property attributes and values , and prevents the addition of new properties .
* @param o Object on which to lock the attributes .
* /
2015-03-13 00:12:22 +01:00
freeze < T > ( o : T ) : T ;
2014-07-13 01:04:16 +02:00
/ * *
* Prevents the addition of new properties to an object .
2016-05-20 13:05:56 +02:00
* @param o Object to make non - extensible .
2014-07-13 01:04:16 +02:00
* /
2015-03-13 00:12:22 +01:00
preventExtensions < T > ( o : T ) : T ;
2014-07-13 01:04:16 +02:00
/ * *
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object .
2016-05-20 13:05:56 +02:00
* @param o Object to test .
2014-07-13 01:04:16 +02:00
* /
isSealed ( o : any ) : boolean ;
/ * *
* Returns true if existing property attributes and values cannot be modified in an object , and new properties cannot be added to the object .
2016-05-20 13:05:56 +02:00
* @param o Object to test .
2014-07-13 01:04:16 +02:00
* /
isFrozen ( o : any ) : boolean ;
/ * *
* Returns a value that indicates whether new properties can be added to an object .
2016-05-20 13:05:56 +02:00
* @param o Object to test .
2014-07-13 01:04:16 +02:00
* /
isExtensible ( o : any ) : boolean ;
/ * *
* Returns the names of the enumerable properties and methods of an object .
* @param o Object that contains the properties and methods . This can be an object that you created or an existing Document Object Model ( DOM ) object .
* /
keys ( o : any ) : string [ ] ;
}
2014-12-12 23:16:35 +01:00
/ * *
* Provides functionality common to all JavaScript objects .
* /
2016-02-23 21:53:52 +01:00
declare const Object : ObjectConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
/ * *
* Creates a new function .
* /
interface Function {
/ * *
* Calls the function , substituting the specified object for the this value of the function , and the specified array for the arguments of the function .
* @param thisArg The object to be used as the this object .
* @param argArray A set of arguments to be passed to the function .
* /
2016-04-11 20:03:15 +02:00
apply ( this : Function , thisArg : any , argArray? : any ) : any ;
2014-07-13 01:04:16 +02:00
/ * *
* Calls a method of an object , substituting another object for the current object .
* @param thisArg The object to be used as the current object .
* @param argArray A list of arguments to be passed to the method .
* /
2016-04-11 20:03:15 +02:00
call ( this : Function , thisArg : any , . . . argArray : any [ ] ) : any ;
2014-07-13 01:04:16 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* For a given function , creates a bound function that has the same body as the original function .
2014-07-13 01:04:16 +02:00
* The this object of the bound function is associated with the specified object , and has the specified initial parameters .
* @param thisArg An object to which the this keyword can refer inside the new function .
* @param argArray A list of arguments to be passed to the new function .
* /
2016-04-11 20:03:15 +02:00
bind ( this : Function , thisArg : any , . . . argArray : any [ ] ) : any ;
2014-07-13 01:04:16 +02:00
2016-10-14 02:29:03 +02:00
/** Returns a string representation of a function. */
toString ( ) : string ;
2014-07-13 01:04:16 +02:00
prototype : any ;
2016-02-23 21:53:52 +01:00
readonly length : number ;
2014-07-13 01:04:16 +02:00
// Non-standard extensions
arguments : any ;
caller : Function ;
}
2014-12-12 23:16:35 +01:00
interface FunctionConstructor {
/ * *
2014-07-13 01:04:16 +02:00
* Creates a new function .
* @param args A list of arguments the function accepts .
* /
new ( . . . args : string [ ] ) : Function ;
( . . . args : string [ ] ) : Function ;
2016-02-23 21:53:52 +01:00
readonly prototype : Function ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const Function : FunctionConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface IArguments {
[ index : number ] : any ;
length : number ;
callee : Function ;
}
interface String {
/** Returns a string representation of a string. */
toString ( ) : string ;
/ * *
* Returns the character at the specified index .
* @param pos The zero - based index of the desired character .
* /
charAt ( pos : number ) : string ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Returns the Unicode value of the character at the specified location .
* @param index The zero - based index of the desired character . If there is no character at the specified index , NaN is returned .
* /
charCodeAt ( index : number ) : number ;
/ * *
* Returns a string that contains the concatenation of two or more strings .
2016-05-20 13:05:56 +02:00
* @param strings The strings to append to the end of the string .
2014-07-13 01:04:16 +02:00
* /
concat ( . . . strings : string [ ] ) : string ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the position of the first occurrence of a substring .
2014-07-13 01:04:16 +02:00
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object . If omitted , search starts at the beginning of the string .
* /
indexOf ( searchString : string , position? : number ) : number ;
/ * *
* Returns the last occurrence of a substring in the string .
* @param searchString The substring to search for .
* @param position The index at which to begin searching . If omitted , the search begins at the end of the string .
* /
lastIndexOf ( searchString : string , position? : number ) : number ;
/ * *
* Determines whether two strings are equivalent in the current locale .
* @param that String to compare to target string
* /
localeCompare ( that : string ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Matches a string with a regular expression , and returns an array containing the results of that search .
* @param regexp A variable name or string literal containing the regular expression pattern and flags .
* /
2016-04-11 20:03:15 +02:00
match ( regexp : string ) : RegExpMatchArray | null ;
2014-07-13 01:04:16 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Matches a string with a regular expression , and returns an array containing the results of that search .
2016-05-20 13:05:56 +02:00
* @param regexp A regular expression object that contains the regular expression pattern and applicable flags .
2014-07-13 01:04:16 +02:00
* /
2016-04-11 20:03:15 +02:00
match ( regexp : RegExp ) : RegExpMatchArray | null ;
2014-07-13 01:04:16 +02:00
/ * *
* Replaces text in a string , using a regular expression or search string .
2015-08-22 00:20:08 +02:00
* @param searchValue A string that represents the regular expression .
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string .
2014-07-13 01:04:16 +02:00
* /
replace ( searchValue : string , replaceValue : string ) : string ;
/ * *
* Replaces text in a string , using a regular expression or search string .
2015-08-22 00:20:08 +02:00
* @param searchValue A string that represents the regular expression .
* @param replacer A function that returns the replacement text .
2014-07-13 01:04:16 +02:00
* /
2015-08-22 00:20:08 +02:00
replace ( searchValue : string , replacer : ( substring : string , . . . args : any [ ] ) = > string ) : string ;
2014-07-13 01:04:16 +02:00
/ * *
* Replaces text in a string , using a regular expression or search string .
2015-08-22 00:20:08 +02:00
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags .
* @param replaceValue A string containing the text to replace for every successful match of searchValue in this string .
2014-07-13 01:04:16 +02:00
* /
replace ( searchValue : RegExp , replaceValue : string ) : string ;
/ * *
* Replaces text in a string , using a regular expression or search string .
* @param searchValue A Regular Expression object containing the regular expression pattern and applicable flags
2015-08-22 00:20:08 +02:00
* @param replacer A function that returns the replacement text .
2014-07-13 01:04:16 +02:00
* /
2015-08-22 00:20:08 +02:00
replace ( searchValue : RegExp , replacer : ( substring : string , . . . args : any [ ] ) = > string ) : string ;
2014-07-13 01:04:16 +02:00
/ * *
* Finds the first substring match in a regular expression search .
2016-05-20 13:05:56 +02:00
* @param regexp The regular expression pattern and applicable flags .
2014-07-13 01:04:16 +02:00
* /
search ( regexp : string ) : number ;
/ * *
* Finds the first substring match in a regular expression search .
2016-05-20 13:05:56 +02:00
* @param regexp The regular expression pattern and applicable flags .
2014-07-13 01:04:16 +02:00
* /
search ( regexp : RegExp ) : number ;
/ * *
* Returns a section of a string .
2016-05-20 13:05:56 +02:00
* @param start The index to the beginning of the specified portion of stringObj .
* @param end The index to the end of the specified portion of stringObj . The substring includes the characters up to , but not including , the character indicated by end .
2014-07-13 01:04:16 +02:00
* If this value is not specified , the substring continues to the end of stringObj .
* /
slice ( start? : number , end? : number ) : string ;
/ * *
* Split a string into substrings using the specified separator and return them as an array .
2016-05-20 13:05:56 +02:00
* @param separator A string that identifies character or characters to use in separating the string . If omitted , a single - element array containing the entire string is returned .
2014-07-13 01:04:16 +02:00
* @param limit A value used to limit the number of elements returned in the array .
* /
split ( separator : string , limit? : number ) : string [ ] ;
/ * *
* Split a string into substrings using the specified separator and return them as an array .
2016-05-20 13:05:56 +02:00
* @param separator A Regular Express that identifies character or characters to use in separating the string . If omitted , a single - element array containing the entire string is returned .
2014-07-13 01:04:16 +02:00
* @param limit A value used to limit the number of elements returned in the array .
* /
split ( separator : RegExp , limit? : number ) : string [ ] ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the substring at the specified location within a String object .
2014-07-13 01:04:16 +02:00
* @param start The zero - based index number indicating the beginning of the substring .
* @param end Zero - based index number indicating the end of the substring . The substring includes the characters up to , but not including , the character indicated by end .
* If end is omitted , the characters from start through the end of the original string are returned .
* /
substring ( start : number , end? : number ) : string ;
/** Converts all the alphabetic characters in a string to lowercase. */
toLowerCase ( ) : string ;
/** Converts all alphabetic characters to lowercase, taking into account the host environment's current locale. */
toLocaleLowerCase ( ) : string ;
/** Converts all the alphabetic characters in a string to uppercase. */
toUpperCase ( ) : string ;
/** Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale. */
toLocaleUpperCase ( ) : string ;
/** Removes the leading and trailing white space and line terminator characters from a string. */
trim ( ) : string ;
/** Returns the length of a String object. */
2016-02-23 21:53:52 +01:00
readonly length : number ;
2014-07-13 01:04:16 +02:00
// IE extensions
/ * *
* Gets a substring beginning at the specified location and having the specified length .
* @param from The starting position of the desired substring . The index of the first character in the string is zero .
* @param length The number of characters to include in the returned substring .
* /
substr ( from : number , length? : number ) : string ;
2015-03-13 00:12:22 +01:00
/** Returns the primitive value of the specified object. */
valueOf ( ) : string ;
2016-02-23 21:53:52 +01:00
readonly [ index : number ] : string ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
interface StringConstructor {
2014-07-13 01:04:16 +02:00
new ( value? : any ) : String ;
( value? : any ) : string ;
2016-02-23 21:53:52 +01:00
readonly prototype : String ;
2014-07-13 01:04:16 +02:00
fromCharCode ( . . . codes : number [ ] ) : string ;
}
2016-05-20 13:05:56 +02:00
/ * *
* Allows manipulation and formatting of text strings and determination and location of substrings within strings .
2014-12-12 23:16:35 +01:00
* /
2016-02-23 21:53:52 +01:00
declare const String : StringConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface Boolean {
2014-12-12 23:16:35 +01:00
/** Returns the primitive value of the specified object. */
valueOf ( ) : boolean ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
interface BooleanConstructor {
2014-07-13 01:04:16 +02:00
new ( value? : any ) : Boolean ;
( value? : any ) : boolean ;
2016-02-23 21:53:52 +01:00
readonly prototype : Boolean ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const Boolean : BooleanConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface Number {
/ * *
* Returns a string representation of an object .
* @param radix Specifies a radix for converting numeric values to strings . This value is only used for numbers .
* /
toString ( radix? : number ) : string ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Returns a string representing a number in fixed - point notation .
* @param fractionDigits Number of digits after the decimal point . Must be in the range 0 - 20 , inclusive .
* /
toFixed ( fractionDigits? : number ) : string ;
/ * *
* Returns a string containing a number represented in exponential notation .
* @param fractionDigits Number of digits after the decimal point . Must be in the range 0 - 20 , inclusive .
* /
toExponential ( fractionDigits? : number ) : string ;
/ * *
* Returns a string containing a number represented either in exponential or fixed - point notation with a specified number of digits .
* @param precision Number of significant digits . Must be in the range 1 - 21 , inclusive .
* /
toPrecision ( precision? : number ) : string ;
2015-03-13 00:12:22 +01:00
/** Returns the primitive value of the specified object. */
valueOf ( ) : number ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
interface NumberConstructor {
2014-07-13 01:04:16 +02:00
new ( value? : any ) : Number ;
( value? : any ) : number ;
2016-02-23 21:53:52 +01:00
readonly prototype : Number ;
2014-07-13 01:04:16 +02:00
/** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
2016-02-23 21:53:52 +01:00
readonly MAX_VALUE : number ;
2014-07-13 01:04:16 +02:00
/** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
2016-02-23 21:53:52 +01:00
readonly MIN_VALUE : number ;
2014-07-13 01:04:16 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* A value that is not a number .
* In equality comparisons , NaN does not equal any value , including itself . To test whether a value is equivalent to NaN , use the isNaN function .
* /
2016-02-23 21:53:52 +01:00
readonly NaN : number ;
2014-07-13 01:04:16 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* A value that is less than the largest negative number that can be represented in JavaScript .
2016-05-20 13:05:56 +02:00
* JavaScript displays NEGATIVE_INFINITY values as - infinity .
2014-07-13 01:04:16 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly NEGATIVE_INFINITY : number ;
2014-07-13 01:04:16 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A value greater than the largest number that can be represented in JavaScript .
* JavaScript displays POSITIVE_INFINITY values as infinity .
2014-07-13 01:04:16 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly POSITIVE_INFINITY : number ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
2016-02-23 21:53:52 +01:00
declare const Number : NumberConstructor ;
2014-12-12 23:16:35 +01:00
2016-09-27 20:44:25 +02:00
interface TemplateStringsArray extends ReadonlyArray < string > {
readonly raw : ReadonlyArray < string >
2014-11-18 22:28:19 +01:00
}
2014-07-13 01:04:16 +02:00
interface Math {
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
2016-02-23 21:53:52 +01:00
readonly E : number ;
2014-07-13 01:04:16 +02:00
/** The natural logarithm of 10. */
2016-02-23 21:53:52 +01:00
readonly LN10 : number ;
2014-07-13 01:04:16 +02:00
/** The natural logarithm of 2. */
2016-02-23 21:53:52 +01:00
readonly LN2 : number ;
2014-07-13 01:04:16 +02:00
/** The base-2 logarithm of e. */
2016-02-23 21:53:52 +01:00
readonly LOG2E : number ;
2014-07-13 01:04:16 +02:00
/** The base-10 logarithm of e. */
2016-02-23 21:53:52 +01:00
readonly LOG10E : number ;
2014-07-13 01:04:16 +02:00
/** Pi. This is the ratio of the circumference of a circle to its diameter. */
2016-02-23 21:53:52 +01:00
readonly PI : number ;
2014-07-13 01:04:16 +02:00
/** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
2016-02-23 21:53:52 +01:00
readonly SQRT1_2 : number ;
2014-07-13 01:04:16 +02:00
/** The square root of 2. */
2016-02-23 21:53:52 +01:00
readonly SQRT2 : number ;
2014-07-13 01:04:16 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the absolute value of a number ( the value without regard to whether it is positive or negative ) .
2014-07-13 01:04:16 +02:00
* For example , the absolute value of - 5 is the same as the absolute value of 5 .
* @param x A numeric expression for which the absolute value is needed .
* /
abs ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the arc cosine ( or inverse cosine ) of a number .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression .
* /
acos ( x : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Returns the arcsine of a number .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression .
* /
asin ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the arctangent of a number .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression for which the arctangent is needed .
* /
atan ( x : number ) : number ;
/ * *
2015-04-24 00:04:56 +02:00
* Returns the angle ( in radians ) from the X axis to a point .
2014-07-13 01:04:16 +02:00
* @param y A numeric expression representing the cartesian y - coordinate .
* @param x A numeric expression representing the cartesian x - coordinate .
* /
atan2 ( y : number , x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the smallest number greater than or equal to its numeric argument .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression .
* /
ceil ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the cosine of a number .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression that contains an angle measured in radians .
* /
cos ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns e ( the base of natural logarithms ) raised to a power .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression representing the power of e .
* /
exp ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the greatest number less than or equal to its numeric argument .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression .
* /
floor ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the natural logarithm ( base e ) of a number .
2014-07-13 01:04:16 +02:00
* @param x A numeric expression .
* /
log ( x : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the larger of a set of supplied numeric expressions .
2014-07-13 01:04:16 +02:00
* @param values Numeric expressions to be evaluated .
* /
max ( . . . values : number [ ] ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the smaller of a set of supplied numeric expressions .
2014-07-13 01:04:16 +02:00
* @param values Numeric expressions to be evaluated .
* /
min ( . . . values : number [ ] ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the value of a base expression taken to a specified power .
2014-07-13 01:04:16 +02:00
* @param x The base value of the expression .
* @param y The exponent value of the expression .
* /
pow ( x : number , y : number ) : number ;
/** Returns a pseudorandom number between 0 and 1. */
random ( ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Returns a supplied numeric expression rounded to the nearest number .
* @param x The value to be rounded to the nearest number .
* /
round ( x : number ) : number ;
/ * *
* Returns the sine of a number .
* @param x A numeric expression that contains an angle measured in radians .
* /
sin ( x : number ) : number ;
/ * *
* Returns the square root of a number .
* @param x A numeric expression .
* /
sqrt ( x : number ) : number ;
/ * *
* Returns the tangent of a number .
* @param x A numeric expression that contains an angle measured in radians .
* /
tan ( x : number ) : number ;
}
/** An intrinsic object that provides basic mathematics functionality and constants. */
2016-02-23 21:53:52 +01:00
declare const Math : Math ;
2014-07-13 01:04:16 +02:00
/** Enables basic storage and retrieval of dates and times. */
interface Date {
/** Returns a string representation of a date. The format of the string depends on the locale. */
toString ( ) : string ;
/** Returns a date as a string value. */
toDateString ( ) : string ;
/** Returns a time as a string value. */
toTimeString ( ) : string ;
/** Returns a value as a string value appropriate to the host environment's current locale. */
toLocaleString ( ) : string ;
/** Returns a date as a string value appropriate to the host environment's current locale. */
toLocaleDateString ( ) : string ;
/** Returns a time as a string value appropriate to the host environment's current locale. */
toLocaleTimeString ( ) : string ;
/** Returns the stored time value in milliseconds since midnight, January 1, 1970 UTC. */
valueOf ( ) : number ;
/** Gets the time value in milliseconds. */
getTime ( ) : number ;
/** Gets the year, using local time. */
getFullYear ( ) : number ;
/** Gets the year using Universal Coordinated Time (UTC). */
getUTCFullYear ( ) : number ;
/** Gets the month, using local time. */
getMonth ( ) : number ;
/** Gets the month of a Date object using Universal Coordinated Time (UTC). */
getUTCMonth ( ) : number ;
/** Gets the day-of-the-month, using local time. */
getDate ( ) : number ;
/** Gets the day-of-the-month, using Universal Coordinated Time (UTC). */
getUTCDate ( ) : number ;
/** Gets the day of the week, using local time. */
getDay ( ) : number ;
/** Gets the day of the week using Universal Coordinated Time (UTC). */
getUTCDay ( ) : number ;
/** Gets the hours in a date, using local time. */
getHours ( ) : number ;
/** Gets the hours value in a Date object using Universal Coordinated Time (UTC). */
getUTCHours ( ) : number ;
/** Gets the minutes of a Date object, using local time. */
getMinutes ( ) : number ;
/** Gets the minutes of a Date object using Universal Coordinated Time (UTC). */
getUTCMinutes ( ) : number ;
/** Gets the seconds of a Date object, using local time. */
getSeconds ( ) : number ;
/** Gets the seconds of a Date object using Universal Coordinated Time (UTC). */
getUTCSeconds ( ) : number ;
/** Gets the milliseconds of a Date, using local time. */
getMilliseconds ( ) : number ;
/** Gets the milliseconds of a Date object using Universal Coordinated Time (UTC). */
getUTCMilliseconds ( ) : number ;
/** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
getTimezoneOffset ( ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Sets the date and time value in the Date object .
2016-05-20 13:05:56 +02:00
* @param time A numeric value representing the number of elapsed milliseconds since midnight , January 1 , 1970 GMT .
2014-07-13 01:04:16 +02:00
* /
setTime ( time : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Sets the milliseconds value in the Date object using local time .
2014-07-13 01:04:16 +02:00
* @param ms A numeric value equal to the millisecond value .
* /
setMilliseconds ( ms : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Sets the milliseconds value in the Date object using Universal Coordinated Time ( UTC ) .
2016-05-20 13:05:56 +02:00
* @param ms A numeric value equal to the millisecond value .
2014-07-13 01:04:16 +02:00
* /
setUTCMilliseconds ( ms : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Sets the seconds value in the Date object using local time .
2014-07-13 01:04:16 +02:00
* @param sec A numeric value equal to the seconds value .
* @param ms A numeric value equal to the milliseconds value .
* /
setSeconds ( sec : number , ms? : number ) : number ;
/ * *
* Sets the seconds value in the Date object using Universal Coordinated Time ( UTC ) .
* @param sec A numeric value equal to the seconds value .
* @param ms A numeric value equal to the milliseconds value .
* /
setUTCSeconds ( sec : number , ms? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Sets the minutes value in the Date object using local time .
* @param min A numeric value equal to the minutes value .
* @param sec A numeric value equal to the seconds value .
2014-07-13 01:04:16 +02:00
* @param ms A numeric value equal to the milliseconds value .
* /
setMinutes ( min : number , sec? : number , ms? : number ) : number ;
/ * *
* Sets the minutes value in the Date object using Universal Coordinated Time ( UTC ) .
2016-05-20 13:05:56 +02:00
* @param min A numeric value equal to the minutes value .
* @param sec A numeric value equal to the seconds value .
2014-07-13 01:04:16 +02:00
* @param ms A numeric value equal to the milliseconds value .
* /
setUTCMinutes ( min : number , sec? : number , ms? : number ) : number ;
/ * *
* Sets the hour value in the Date object using local time .
* @param hours A numeric value equal to the hours value .
* @param min A numeric value equal to the minutes value .
2016-05-20 13:05:56 +02:00
* @param sec A numeric value equal to the seconds value .
2014-07-13 01:04:16 +02:00
* @param ms A numeric value equal to the milliseconds value .
* /
setHours ( hours : number , min? : number , sec? : number , ms? : number ) : number ;
/ * *
* Sets the hours value in the Date object using Universal Coordinated Time ( UTC ) .
* @param hours A numeric value equal to the hours value .
* @param min A numeric value equal to the minutes value .
2016-05-20 13:05:56 +02:00
* @param sec A numeric value equal to the seconds value .
2014-07-13 01:04:16 +02:00
* @param ms A numeric value equal to the milliseconds value .
* /
setUTCHours ( hours : number , min? : number , sec? : number , ms? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Sets the numeric day - of - the - month value of the Date object using local time .
2014-07-13 01:04:16 +02:00
* @param date A numeric value equal to the day of the month .
* /
setDate ( date : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Sets the numeric day of the month in the Date object using Universal Coordinated Time ( UTC ) .
2016-05-20 13:05:56 +02:00
* @param date A numeric value equal to the day of the month .
2014-07-13 01:04:16 +02:00
* /
setUTCDate ( date : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Sets the month value in the Date object using local time .
* @param month A numeric value equal to the month . The value for January is 0 , and other month values follow consecutively .
2014-07-13 01:04:16 +02:00
* @param date A numeric value representing the day of the month . If this value is not supplied , the value from a call to the getDate method is used .
* /
setMonth ( month : number , date? : number ) : number ;
/ * *
* Sets the month value in the Date object using Universal Coordinated Time ( UTC ) .
* @param month A numeric value equal to the month . The value for January is 0 , and other month values follow consecutively .
* @param date A numeric value representing the day of the month . If it is not supplied , the value from a call to the getUTCDate method is used .
* /
setUTCMonth ( month : number , date? : number ) : number ;
/ * *
* Sets the year of the Date object using local time .
* @param year A numeric value for the year .
* @param month A zero - based numeric value for the month ( 0 for January , 11 for December ) . Must be specified if numDate is specified .
* @param date A numeric value equal for the day of the month .
* /
setFullYear ( year : number , month? : number , date? : number ) : number ;
/ * *
* Sets the year value in the Date object using Universal Coordinated Time ( UTC ) .
* @param year A numeric value equal to the year .
* @param month A numeric value equal to the month . The value for January is 0 , and other month values follow consecutively . Must be supplied if numDate is supplied .
* @param date A numeric value equal to the day of the month .
* /
setUTCFullYear ( year : number , month? : number , date? : number ) : number ;
/** Returns a date converted to a string using Universal Coordinated Time (UTC). */
toUTCString ( ) : string ;
/** Returns a date as a string value in ISO format. */
toISOString ( ) : string ;
/** Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. */
toJSON ( key? : any ) : string ;
}
2014-12-12 23:16:35 +01:00
interface DateConstructor {
2014-07-13 01:04:16 +02:00
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 ;
( ) : string ;
2016-02-23 21:53:52 +01:00
readonly prototype : Date ;
2014-07-13 01:04:16 +02:00
/ * *
* Parses a string containing a date , and returns the number of milliseconds between that date and midnight , January 1 , 1970 .
* @param s A date string
* /
parse ( s : string ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the number of milliseconds between midnight , January 1 , 1970 Universal Coordinated Time ( UTC ) ( or GMT ) and the specified date .
2014-07-13 01:04:16 +02:00
* @param year The full year designation is required for cross - century date accuracy . If year is between 0 and 99 is used , then year is assumed to be 1900 + year .
* @param month The month as an number between 0 and 11 ( January to December ) .
* @param date The date as an number between 1 and 31 .
* @param hours Must be supplied if minutes is supplied . An number from 0 to 23 ( midnight to 11 pm ) that specifies the hour .
* @param minutes Must be supplied if seconds is supplied . An number from 0 to 59 that specifies the minutes .
* @param seconds Must be supplied if milliseconds is supplied . An number from 0 to 59 that specifies the seconds .
* @param ms An number from 0 to 999 that specifies the milliseconds .
* /
UTC ( year : number , month : number , date? : number , hours? : number , minutes? : number , seconds? : number , ms? : number ) : number ;
now ( ) : number ;
}
2016-02-23 21:53:52 +01:00
declare const Date : DateConstructor ;
2014-12-12 23:16:35 +01:00
2014-08-12 20:49:59 +02:00
interface RegExpMatchArray extends Array < string > {
index? : number ;
input? : string ;
}
2014-07-13 01:04:16 +02:00
2014-08-12 20:49:59 +02:00
interface RegExpExecArray extends Array < string > {
2014-07-13 01:04:16 +02:00
index : number ;
input : string ;
}
interface RegExp {
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Executes a search on a string using a regular expression pattern , and returns an array containing the results of that search .
* @param string The String object or string literal on which to perform the search .
* /
2016-04-11 20:03:15 +02:00
exec ( string : string ) : RegExpExecArray | null ;
2014-07-13 01:04:16 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Returns a Boolean value that indicates whether or not a pattern exists in a searched string .
* @param string String on which to perform the search .
* /
test ( string : string ) : boolean ;
2015-04-11 02:16:59 +02:00
/** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
2016-02-23 21:53:52 +01:00
readonly source : string ;
2014-07-13 01:04:16 +02:00
/** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
2016-02-23 21:53:52 +01:00
readonly global : boolean ;
2014-07-13 01:04:16 +02:00
/** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
2016-02-23 21:53:52 +01:00
readonly ignoreCase : boolean ;
2014-07-13 01:04:16 +02:00
/** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
2016-02-23 21:53:52 +01:00
readonly multiline : boolean ;
2014-07-13 01:04:16 +02:00
lastIndex : number ;
// Non-standard extensions
2016-04-11 20:03:15 +02:00
compile ( ) : this ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
interface RegExpConstructor {
2016-05-20 13:05:56 +02:00
new ( pattern : RegExp ) : RegExp ;
2014-07-13 01:04:16 +02:00
new ( pattern : string , flags? : string ) : RegExp ;
2016-05-20 13:05:56 +02:00
( pattern : RegExp ) : RegExp ;
2014-07-13 01:04:16 +02:00
( pattern : string , flags? : string ) : RegExp ;
2016-02-23 21:53:52 +01:00
readonly prototype : RegExp ;
2014-07-13 01:04:16 +02:00
// Non-standard extensions
$1 : string ;
$2 : string ;
$3 : string ;
$4 : string ;
$5 : string ;
$6 : string ;
$7 : string ;
$8 : string ;
$9 : string ;
lastMatch : string ;
}
2016-02-23 21:53:52 +01:00
declare const RegExp : RegExpConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface Error {
name : string ;
message : string ;
2016-05-20 13:05:56 +02:00
stack? : string ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
interface ErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : Error ;
( message? : string ) : Error ;
2016-02-23 21:53:52 +01:00
readonly prototype : Error ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const Error : ErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface EvalError extends Error {
}
2014-12-12 23:16:35 +01:00
interface EvalErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : EvalError ;
( message? : string ) : EvalError ;
2016-02-23 21:53:52 +01:00
readonly prototype : EvalError ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const EvalError : EvalErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface RangeError extends Error {
}
2014-12-12 23:16:35 +01:00
interface RangeErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : RangeError ;
( message? : string ) : RangeError ;
2016-02-23 21:53:52 +01:00
readonly prototype : RangeError ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const RangeError : RangeErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface ReferenceError extends Error {
}
2014-12-12 23:16:35 +01:00
interface ReferenceErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : ReferenceError ;
( message? : string ) : ReferenceError ;
2016-02-23 21:53:52 +01:00
readonly prototype : ReferenceError ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const ReferenceError : ReferenceErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface SyntaxError extends Error {
}
2014-12-12 23:16:35 +01:00
interface SyntaxErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : SyntaxError ;
( message? : string ) : SyntaxError ;
2016-02-23 21:53:52 +01:00
readonly prototype : SyntaxError ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const SyntaxError : SyntaxErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface TypeError extends Error {
}
2014-12-12 23:16:35 +01:00
interface TypeErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : TypeError ;
( message? : string ) : TypeError ;
2016-02-23 21:53:52 +01:00
readonly prototype : TypeError ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const TypeError : TypeErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface URIError extends Error {
}
2014-12-12 23:16:35 +01:00
interface URIErrorConstructor {
2014-07-13 01:04:16 +02:00
new ( message? : string ) : URIError ;
( message? : string ) : URIError ;
2016-02-23 21:53:52 +01:00
readonly prototype : URIError ;
2014-07-13 01:04:16 +02:00
}
2016-02-23 21:53:52 +01:00
declare const URIError : URIErrorConstructor ;
2014-12-12 23:16:35 +01:00
2014-07-13 01:04:16 +02:00
interface JSON {
/ * *
* Converts a JavaScript Object Notation ( JSON ) string into an object .
* @param text A valid JSON string .
2016-05-20 13:05:56 +02:00
* @param reviver A function that transforms the results . This function is called for each member of the object .
* If a member contains nested objects , the nested objects are transformed before the parent object is .
2014-07-13 01:04:16 +02:00
* /
parse ( text : string , reviver ? : ( key : any , value : any ) = > any ) : any ;
/ * *
* Converts a JavaScript value to a JavaScript Object Notation ( JSON ) string .
* @param value A JavaScript value , usually an object or array , to be converted .
* @param replacer A function that transforms the results .
* @param space Adds indentation , white space , and line break characters to the return - value JSON text to make it easier to read .
* /
2016-05-25 21:17:57 +02:00
stringify ( value : any , replacer ? : ( key : string , value : any ) = > any , space? : string | number ) : string ;
2014-07-13 01:04:16 +02:00
/ * *
* Converts a JavaScript value to a JavaScript Object Notation ( JSON ) string .
* @param value A JavaScript value , usually an object or array , to be converted .
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified .
2014-07-13 01:04:16 +02:00
* @param space Adds indentation , white space , and line break characters to the return - value JSON text to make it easier to read .
* /
2016-05-25 21:17:57 +02:00
stringify ( value : any , replacer ? : ( number | string ) [ ] | null , space? : string | number ) : string ;
2014-07-13 01:04:16 +02:00
}
2016-05-25 21:17:57 +02:00
2014-07-13 01:04:16 +02:00
/ * *
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation ( JSON ) format .
* /
2016-02-23 21:53:52 +01:00
declare const JSON : JSON ;
2014-07-13 01:04:16 +02:00
/////////////////////////////
/// ECMAScript Array API (specially handled by compiler)
/////////////////////////////
2016-02-23 21:53:52 +01:00
interface ReadonlyArray < T > {
/ * *
* Gets the length of the array . This is a number one higher than the highest element defined in an array .
* /
readonly length : number ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
toLocaleString ( ) : string ;
/ * *
* Combines two or more arrays .
* @param items Additional items to add to the end of array1 .
* /
concat < U extends ReadonlyArray < T > > ( . . . items : U [ ] ) : T [ ] ;
/ * *
* Combines two or more arrays .
* @param items Additional items to add to the end of array1 .
* /
2016-09-27 20:44:25 +02:00
concat ( . . . items : T [ ] [ ] ) : T [ ] ;
/ * *
* Combines two or more arrays .
* @param items Additional items to add to the end of array1 .
* /
concat ( . . . items : ( T | T [ ] ) [ ] ) : T [ ] ;
2016-02-23 21:53:52 +01:00
/ * *
* Adds all the elements of an array separated by the specified separator string .
* @param separator A string used to separate one element of an array from the next in the resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : T [ ] ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the search starts at index 0 .
* /
indexOf ( searchElement : T , fromIndex? : number ) : number ;
/ * *
* Returns the index of the last occurrence of a specified value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the search starts at the last index in the array .
* /
lastIndexOf ( searchElement : T , fromIndex? : number ) : number ;
/ * *
* Determines whether all the members of an array satisfy the specified test .
* @param callbackfn A function that accepts up to three arguments . The every method calls the callbackfn function for each element in array1 until the callbackfn returns false , or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : T , index : number , array : ReadonlyArray < T > ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
* @param callbackfn A function that accepts up to three arguments . The some method calls the callbackfn function for each element in array1 until the callbackfn returns true , or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : T , index : number , array : ReadonlyArray < T > ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the callbackfn function one time for each element in the array .
2016-02-23 21:53:52 +01:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : T , index : number , array : ReadonlyArray < T > ) = > void , thisArg? : any ) : void ;
/ * *
* Calls a defined callback function on each element of an array , and returns an array that contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the callbackfn function one time for each element in the array .
2016-02-23 21:53:52 +01:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
map < U > ( callbackfn : ( value : T , index : number , array : ReadonlyArray < T > ) = > U , thisArg? : any ) : U [ ] ;
2016-09-27 20:44:25 +02:00
/ * *
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
filter < S extends T > ( callbackfn : ( value : T , index : number , array : ReadonlyArray < T > ) = > value is S , thisArg? : any ) : S [ ] ;
2016-02-23 21:53:52 +01:00
/ * *
* Returns the elements of an array that meet the condition specified in a callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The filter method calls the callbackfn function one time for each element in the array .
2016-02-23 21:53:52 +01:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : T , index : number , array : ReadonlyArray < T > ) = > any , thisArg? : any ) : T [ ] ;
2016-02-23 21:53:52 +01:00
/ * *
* Calls the specified callback function for all the elements in an array . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduce ( callbackfn : ( previousValue : T , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) = > T , initialValue? : T ) : T ;
/ * *
* Calls the specified callback function for all the elements in an array . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) = > U , initialValue : U ) : U ;
/ * *
* Calls the specified callback function for all the elements in an array , in descending order . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls the callbackfn function one time for each element in the array .
2016-02-23 21:53:52 +01:00
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : T , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) = > T , initialValue? : T ) : T ;
/ * *
* Calls the specified callback function for all the elements in an array , in descending order . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls the callbackfn function one time for each element in the array .
2016-02-23 21:53:52 +01:00
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : T , currentIndex : number , array : ReadonlyArray < T > ) = > U , initialValue : U ) : U ;
readonly [ n : number ] : T ;
}
2014-07-13 01:04:16 +02:00
interface Array < T > {
2014-08-19 00:42:55 +02:00
/ * *
* Gets or sets the length of the array . This is a number one higher than the highest element defined in an array .
* /
length : number ;
2014-07-13 01:04:16 +02:00
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
toLocaleString ( ) : string ;
2014-08-19 00:42:55 +02:00
/ * *
* Appends new elements to an array , and returns the new length of the array .
* @param items New elements of the Array .
* /
push ( . . . items : T [ ] ) : number ;
/ * *
* Removes the last element from an array and returns it .
* /
2016-04-11 20:03:15 +02:00
pop ( ) : T | undefined ;
2016-09-27 20:44:25 +02:00
/ * *
* Combines two or more arrays .
* @param items Additional items to add to the end of array1 .
* /
concat ( . . . items : T [ ] [ ] ) : T [ ] ;
2014-07-13 01:04:16 +02:00
/ * *
* Combines two or more arrays .
* @param items Additional items to add to the end of array1 .
* /
2016-02-23 21:53:52 +01:00
concat ( . . . items : ( T | T [ ] ) [ ] ) : T [ ] ;
2014-07-13 01:04:16 +02:00
/ * *
* Adds all the elements of an array separated by the specified separator string .
* @param separator A string used to separate one element of an array from the next in the resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2014-07-13 01:04:16 +02:00
* /
reverse ( ) : T [ ] ;
/ * *
* Removes the first element from an array and returns it .
* /
2016-04-11 20:03:15 +02:00
shift ( ) : T | undefined ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : T [ ] ;
/ * *
* Sorts an array .
* @param compareFn The name of the function used to determine the order of the elements . If omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : T , b : T ) = > number ) : this ;
2014-07-13 01:04:16 +02:00
/ * *
* Removes elements from an array and , if necessary , inserts new elements in their place , returning the deleted elements .
* @param start The zero - based location in the array from which to start removing elements .
* /
splice ( start : number ) : T [ ] ;
/ * *
* Removes elements from an array and , if necessary , inserts new elements in their place , returning the deleted elements .
* @param start The zero - based location in the array from which to start removing elements .
* @param deleteCount The number of elements to remove .
* @param items Elements to insert into the array in place of the deleted elements .
* /
splice ( start : number , deleteCount : number , . . . items : T [ ] ) : T [ ] ;
/ * *
* Inserts new elements at the start of an array .
* @param items Elements to insert at the start of the Array .
* /
unshift ( . . . items : T [ ] ) : number ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the search starts at index 0 .
* /
indexOf ( searchElement : T , fromIndex? : number ) : number ;
/ * *
* Returns the index of the last occurrence of a specified value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the search starts at the last index in the array .
* /
lastIndexOf ( searchElement : T , fromIndex? : number ) : number ;
/ * *
* Determines whether all the members of an array satisfy the specified test .
* @param callbackfn A function that accepts up to three arguments . The every method calls the callbackfn function for each element in array1 until the callbackfn returns false , or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : T , index : number , array : T [ ] ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
* @param callbackfn A function that accepts up to three arguments . The some method calls the callbackfn function for each element in array1 until the callbackfn returns true , or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : T , index : number , array : T [ ] ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the callbackfn function one time for each element in the array .
2014-07-13 01:04:16 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : T , index : number , array : T [ ] ) = > void , thisArg? : any ) : void ;
/ * *
* Calls a defined callback function on each element of an array , and returns an array that contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the callbackfn function one time for each element in the array .
2016-10-14 02:08:58 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
map < U > ( this : [ T , T , T , T , T ] , callbackfn : ( value : T , index : number , array : T [ ] ) = > U , thisArg? : any ) : [ U , U , U , U , U ] ;
/ * *
* Calls a defined callback function on each element of an array , and returns an array that contains the results .
* @param callbackfn A function that accepts up to three arguments . The map method calls the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
map < U > ( this : [ T , T , T , T ] , callbackfn : ( value : T , index : number , array : T [ ] ) = > U , thisArg? : any ) : [ U , U , U , U ] ;
/ * *
* Calls a defined callback function on each element of an array , and returns an array that contains the results .
* @param callbackfn A function that accepts up to three arguments . The map method calls the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
map < U > ( this : [ T , T , T ] , callbackfn : ( value : T , index : number , array : T [ ] ) = > U , thisArg? : any ) : [ U , U , U ] ;
/ * *
* Calls a defined callback function on each element of an array , and returns an array that contains the results .
* @param callbackfn A function that accepts up to three arguments . The map method calls the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
map < U > ( this : [ T , T ] , callbackfn : ( value : T , index : number , array : T [ ] ) = > U , thisArg? : any ) : [ U , U ] ;
/ * *
* Calls a defined callback function on each element of an array , and returns an array that contains the results .
* @param callbackfn A function that accepts up to three arguments . The map method calls the callbackfn function one time for each element in the array .
2014-07-13 01:04:16 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
map < U > ( callbackfn : ( value : T , index : number , array : T [ ] ) = > U , thisArg? : any ) : U [ ] ;
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls the callbackfn function one time for each element in the array .
2014-07-13 01:04:16 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function . If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : T , index : number , array : T [ ] ) = > any , thisArg? : any ) : T [ ] ;
2014-07-13 01:04:16 +02:00
/ * *
* Calls the specified callback function for all the elements in an array . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduce ( callbackfn : ( previousValue : T , currentValue : T , currentIndex : number , array : T [ ] ) = > T , initialValue? : T ) : T ;
/ * *
* Calls the specified callback function for all the elements in an array . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : T , currentIndex : number , array : T [ ] ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Calls the specified callback function for all the elements in an array , in descending order . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls the callbackfn function one time for each element in the array .
2014-07-13 01:04:16 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : T , currentValue : T , currentIndex : number , array : T [ ] ) = > T , initialValue? : T ) : T ;
2016-05-20 13:05:56 +02:00
/ * *
2014-07-13 01:04:16 +02:00
* Calls the specified callback function for all the elements in an array , in descending order . The return value of the callback function is the accumulated result , and is provided as an argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls the callbackfn function one time for each element in the array .
2014-07-13 01:04:16 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start the accumulation . The first call to the callbackfn function provides this value as an argument instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : T , currentIndex : number , array : T [ ] ) = > U , initialValue : U ) : U ;
[ n : number ] : T ;
}
2014-12-12 23:16:35 +01:00
interface ArrayConstructor {
2014-07-13 01:04:16 +02:00
new ( arrayLength? : number ) : any [ ] ;
new < T > ( arrayLength : number ) : T [ ] ;
new < T > ( . . . items : T [ ] ) : T [ ] ;
( arrayLength? : number ) : any [ ] ;
< T > ( arrayLength : number ) : T [ ] ;
< T > ( . . . items : T [ ] ) : T [ ] ;
2015-06-22 16:42:40 +02:00
isArray ( arg : any ) : arg is Array < any > ;
2016-02-23 21:53:52 +01:00
readonly prototype : Array < any > ;
2014-07-13 01:04:16 +02:00
}
2014-12-12 23:16:35 +01:00
2016-02-23 21:53:52 +01:00
declare const Array : ArrayConstructor ;
2015-03-27 23:44:57 +01:00
interface TypedPropertyDescriptor < T > {
enumerable? : boolean ;
configurable? : boolean ;
writable? : boolean ;
value? : T ;
get ? : ( ) = > T ;
set ? : ( value : T ) = > void ;
}
declare type ClassDecorator = < TFunction extends Function > ( target : TFunction ) = > TFunction | void ;
declare type PropertyDecorator = ( target : Object , propertyKey : string | symbol ) = > void ;
declare type MethodDecorator = < T > ( target : Object , propertyKey : string | symbol , descriptor : TypedPropertyDescriptor < T > ) = > TypedPropertyDescriptor < T > | void ;
2015-04-09 23:21:57 +02:00
declare type ParameterDecorator = ( target : Object , propertyKey : string | symbol , parameterIndex : number ) = > void ;
2015-07-13 20:13:12 +02:00
declare type PromiseConstructorLike = new < T > ( executor : ( resolve : ( value? : T | PromiseLike < T > ) = > void , reject : ( reason? : any ) = > void ) = > void ) = > PromiseLike < T > ;
interface PromiseLike < T > {
/ * *
2016-09-27 20:44:25 +02:00
* Attaches callbacks for the resolution and / or rejection of the Promise .
* @param onfulfilled The callback to execute when the Promise is resolved .
* @param onrejected The callback to execute when the Promise is rejected .
* @returns A Promise for the completion of which ever callback is executed .
* /
then (
onfulfilled ? : ( ( value : T ) = > T | PromiseLike < T > ) | undefined | null ,
onrejected ? : ( ( reason : any ) = > T | PromiseLike < T > ) | undefined | null ) : PromiseLike < T > ;
/ * *
* Attaches callbacks for the resolution and / or rejection of the Promise .
* @param onfulfilled The callback to execute when the Promise is resolved .
* @param onrejected The callback to execute when the Promise is rejected .
* @returns A Promise for the completion of which ever callback is executed .
* /
then < TResult > (
onfulfilled : ( ( value : T ) = > T | PromiseLike < T > ) | undefined | null ,
onrejected : ( reason : any ) = > TResult | PromiseLike < TResult > ) : PromiseLike < T | TResult > ;
/ * *
* Attaches callbacks for the resolution and / or rejection of the Promise .
* @param onfulfilled The callback to execute when the Promise is resolved .
* @param onrejected The callback to execute when the Promise is rejected .
* @returns A Promise for the completion of which ever callback is executed .
* /
then < TResult > (
onfulfilled : ( value : T ) = > TResult | PromiseLike < TResult > ,
onrejected ? : ( ( reason : any ) = > TResult | PromiseLike < TResult > ) | undefined | null ) : PromiseLike < TResult > ;
/ * *
* Attaches callbacks for the resolution and / or rejection of the Promise .
* @param onfulfilled The callback to execute when the Promise is resolved .
* @param onrejected The callback to execute when the Promise is rejected .
* @returns A Promise for the completion of which ever callback is executed .
* /
then < TResult1 , TResult2 > (
onfulfilled : ( value : T ) = > TResult1 | PromiseLike < TResult1 > ,
onrejected : ( reason : any ) = > TResult2 | PromiseLike < TResult2 > ) : PromiseLike < TResult1 | TResult2 > ;
2015-08-22 00:20:08 +02:00
}
interface ArrayLike < T > {
2016-02-23 21:53:52 +01:00
readonly length : number ;
readonly [ n : number ] : T ;
2015-08-22 00:20:08 +02:00
}
/ * *
2016-05-20 13:05:56 +02:00
* Represents a raw buffer of binary data , which is used to store data for the
* different typed arrays . ArrayBuffers cannot be read from or written to directly ,
* but can be passed to a typed array or DataView Object to interpret the raw
* buffer as needed .
2015-08-22 00:20:08 +02:00
* /
interface ArrayBuffer {
/ * *
* Read - only . The length of the ArrayBuffer ( in bytes ) .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a section of an ArrayBuffer .
* /
slice ( begin :number , end? :number ) : ArrayBuffer ;
}
interface ArrayBufferConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
new ( byteLength : number ) : ArrayBuffer ;
2015-10-27 01:17:23 +01:00
isView ( arg : any ) : arg is ArrayBufferView ;
2015-08-22 00:20:08 +02:00
}
2016-02-23 21:53:52 +01:00
declare const ArrayBuffer : ArrayBufferConstructor ;
2015-08-22 00:20:08 +02:00
interface ArrayBufferView {
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
buffer : ArrayBuffer ;
/ * *
* The length in bytes of the array .
* /
byteLength : number ;
/ * *
* The offset in bytes of the array .
* /
byteOffset : number ;
}
interface DataView {
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
readonly byteLength : number ;
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Float32 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getFloat32 ( byteOffset : number , littleEndian? : boolean ) : number ;
/ * *
* Gets the Float64 value at the specified byte offset from the start of the view . There is
2016-05-20 13:05:56 +02:00
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getFloat64 ( byteOffset : number , littleEndian? : boolean ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Int8 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getInt8 ( byteOffset : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Int16 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getInt16 ( byteOffset : number , littleEndian? : boolean ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Int32 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getInt32 ( byteOffset : number , littleEndian? : boolean ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Uint8 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getUint8 ( byteOffset : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Uint16 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getUint16 ( byteOffset : number , littleEndian? : boolean ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Gets the Uint32 value at the specified byte offset from the start of the view . There is
* no alignment constraint ; multi - byte values may be fetched from any offset .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be retrieved .
* /
getUint32 ( byteOffset : number , littleEndian? : boolean ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Float32 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
2016-05-20 13:05:56 +02:00
* @param littleEndian If false or undefined , a big - endian value should be written ,
2015-08-22 00:20:08 +02:00
* otherwise a little - endian value should be written .
* /
setFloat32 ( byteOffset : number , value : number , littleEndian? : boolean ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Float64 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
2016-05-20 13:05:56 +02:00
* @param littleEndian If false or undefined , a big - endian value should be written ,
2015-08-22 00:20:08 +02:00
* otherwise a little - endian value should be written .
* /
setFloat64 ( byteOffset : number , value : number , littleEndian? : boolean ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Int8 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
* /
setInt8 ( byteOffset : number , value : number ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Int16 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
2016-05-20 13:05:56 +02:00
* @param littleEndian If false or undefined , a big - endian value should be written ,
2015-08-22 00:20:08 +02:00
* otherwise a little - endian value should be written .
* /
setInt16 ( byteOffset : number , value : number , littleEndian? : boolean ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Int32 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
2016-05-20 13:05:56 +02:00
* @param littleEndian If false or undefined , a big - endian value should be written ,
2015-08-22 00:20:08 +02:00
* otherwise a little - endian value should be written .
* /
setInt32 ( byteOffset : number , value : number , littleEndian? : boolean ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Uint8 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
* /
setUint8 ( byteOffset : number , value : number ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Uint16 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
2016-05-20 13:05:56 +02:00
* @param littleEndian If false or undefined , a big - endian value should be written ,
2015-08-22 00:20:08 +02:00
* otherwise a little - endian value should be written .
* /
setUint16 ( byteOffset : number , value : number , littleEndian? : boolean ) : void ;
/ * *
2016-05-20 13:05:56 +02:00
* Stores an Uint32 value at the specified byte offset from the start of the view .
2015-08-22 00:20:08 +02:00
* @param byteOffset The place in the buffer at which the value should be set .
* @param value The value to set .
2016-05-20 13:05:56 +02:00
* @param littleEndian If false or undefined , a big - endian value should be written ,
2015-08-22 00:20:08 +02:00
* otherwise a little - endian value should be written .
* /
setUint32 ( byteOffset : number , value : number , littleEndian? : boolean ) : void ;
}
interface DataViewConstructor {
new ( buffer : ArrayBuffer , byteOffset? : number , byteLength? : number ) : DataView ;
}
2016-02-23 21:53:52 +01:00
declare const DataView : DataViewConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 8 - bit integer values . The contents are initialized to 0 . If the requested
2015-08-22 00:20:08 +02:00
* number of bytes could not be allocated an exception is raised .
* /
interface Int8Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Int8Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Int8Array ) = > any , thisArg? : any ) : Int8Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Int8Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Int8Array ) = > number , thisArg? : any ) : Int8Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Int8Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Int8Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Int8Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Int8Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Int8Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Int8Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Int8Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Int8Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Int8Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Int8ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Int8Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Int8Array ;
new ( array : ArrayLike < number > ) : Int8Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Int8Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Int8Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Int8Array ;
}
2016-02-23 21:53:52 +01:00
declare const Int8Array : Int8ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 8 - bit unsigned integer values . The contents are initialized to 0 . If the
2015-08-22 00:20:08 +02:00
* requested number of bytes could not be allocated an exception is raised .
* /
interface Uint8Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Uint8Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Uint8Array ) = > any , thisArg? : any ) : Uint8Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Uint8Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Uint8Array ) = > number , thisArg? : any ) : Uint8Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint8Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint8Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint8Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint8Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Uint8Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Uint8Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Uint8Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Uint8Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Uint8Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Uint8ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Uint8Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Uint8Array ;
new ( array : ArrayLike < number > ) : Uint8Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Uint8Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Uint8Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Uint8Array ;
}
2016-02-23 21:53:52 +01:00
declare const Uint8Array : Uint8ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 8 - bit unsigned integer ( clamped ) values . The contents are initialized to 0 .
2015-08-22 00:20:08 +02:00
* If the requested number of bytes could not be allocated an exception is raised .
* /
interface Uint8ClampedArray {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Uint8ClampedArray ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Uint8ClampedArray ) = > any , thisArg? : any ) : Uint8ClampedArray ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Uint8ClampedArray ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Uint8ClampedArray ) = > number , thisArg? : any ) : Uint8ClampedArray ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint8ClampedArray ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint8ClampedArray ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint8ClampedArray ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint8ClampedArray ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Uint8ClampedArray ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : Uint8ClampedArray , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Uint8ClampedArray ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Uint8ClampedArray ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Uint8ClampedArray ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Uint8ClampedArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Uint8ClampedArray ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Uint8ClampedArray ;
new ( array : ArrayLike < number > ) : Uint8ClampedArray ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Uint8ClampedArray ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Uint8ClampedArray ;
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Uint8ClampedArray ;
}
2016-02-23 21:53:52 +01:00
declare const Uint8ClampedArray : Uint8ClampedArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 16 - bit signed integer values . The contents are initialized to 0 . If the
2015-08-22 00:20:08 +02:00
* requested number of bytes could not be allocated an exception is raised .
* /
interface Int16Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Int16Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Int16Array ) = > any , thisArg? : any ) : Int16Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Int16Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Int16Array ) = > number , thisArg? : any ) : Int16Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Int16Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Int16Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Int16Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Int16Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Int16Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Int16Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Int16Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Int16Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Int16Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Int16ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Int16Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Int16Array ;
new ( array : ArrayLike < number > ) : Int16Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Int16Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Int16Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Int16Array ;
}
2016-02-23 21:53:52 +01:00
declare const Int16Array : Int16ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 16 - bit unsigned integer values . The contents are initialized to 0 . If the
2015-08-22 00:20:08 +02:00
* requested number of bytes could not be allocated an exception is raised .
* /
interface Uint16Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Uint16Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Uint16Array ) = > any , thisArg? : any ) : Uint16Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Uint16Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Uint16Array ) = > number , thisArg? : any ) : Uint16Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint16Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint16Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint16Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint16Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Uint16Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Uint16Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Uint16Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Uint16Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Uint16Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Uint16ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Uint16Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Uint16Array ;
new ( array : ArrayLike < number > ) : Uint16Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Uint16Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Uint16Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Uint16Array ;
}
2016-02-23 21:53:52 +01:00
declare const Uint16Array : Uint16ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 32 - bit signed integer values . The contents are initialized to 0 . If the
2015-08-22 00:20:08 +02:00
* requested number of bytes could not be allocated an exception is raised .
* /
interface Int32Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Int32Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Int32Array ) = > any , thisArg? : any ) : Int32Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Int32Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Int32Array ) = > number , thisArg? : any ) : Int32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Int32Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Int32Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Int32Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Int32Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Int32Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Int32Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Int32Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Int32Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Int32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Int32ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Int32Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Int32Array ;
new ( array : ArrayLike < number > ) : Int32Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Int32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Int32Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Int32Array ;
}
2016-02-23 21:53:52 +01:00
declare const Int32Array : Int32ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 32 - bit unsigned integer values . The contents are initialized to 0 . If the
2015-08-22 00:20:08 +02:00
* requested number of bytes could not be allocated an exception is raised .
* /
interface Uint32Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Uint32Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Uint32Array ) = > any , thisArg? : any ) : Uint32Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Uint32Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Uint32Array ) = > number , thisArg? : any ) : Uint32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint32Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint32Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Uint32Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Uint32Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Uint32Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Uint32Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Uint32Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Uint32Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Uint32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Uint32ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Uint32Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Uint32Array ;
new ( array : ArrayLike < number > ) : Uint32Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Uint32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Uint32Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Uint32Array ;
}
2016-02-23 21:53:52 +01:00
declare const Uint32Array : Uint32ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
* A typed array of 32 - bit float values . The contents are initialized to 0 . If the requested number
* of bytes could not be allocated an exception is raised .
* /
interface Float32Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Float32Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Float32Array ) = > any , thisArg? : any ) : Float32Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Float32Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Float32Array ) = > number , thisArg? : any ) : Float32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Float32Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Float32Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Float32Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Float32Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Float32Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Float32Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Float32Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Float32Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Float32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Float32ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Float32Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Float32Array ;
new ( array : ArrayLike < number > ) : Float32Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Float32Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Float32Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Float32Array ;
}
2016-02-23 21:53:52 +01:00
declare const Float32Array : Float32ArrayConstructor ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* A typed array of 64 - bit float values . The contents are initialized to 0 . If the requested
2015-08-22 00:20:08 +02:00
* number of bytes could not be allocated an exception is raised .
* /
interface Float64Array {
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* The ArrayBuffer instance referenced by the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly buffer : ArrayBuffer ;
2015-08-22 00:20:08 +02:00
/ * *
* The length in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteLength : number ;
2015-08-22 00:20:08 +02:00
/ * *
* The offset in bytes of the array .
* /
2016-02-23 21:53:52 +01:00
readonly byteOffset : number ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
2016-05-20 13:05:56 +02:00
* @param target If target is negative , it is treated as length + target where length is the
* length of the array .
* @param start If start is negative , it is treated as length + start . If end is negative , it
2015-08-22 00:20:08 +02:00
* is treated as length + end .
2016-05-20 13:05:56 +02:00
* @param end If not specified , length of the this object is used as its default value .
2015-08-22 00:20:08 +02:00
* /
2016-05-20 13:05:56 +02:00
copyWithin ( target : number , start : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Determines whether all the members of an array satisfy the specified test .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The every method calls
* the callbackfn function for each element in array1 until the callbackfn returns false ,
2015-08-22 00:20:08 +02:00
* or until the end of the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
* If thisArg is omitted , undefined is used as the this value .
* /
every ( callbackfn : ( value : number , index : number , array : Float64Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
2016-05-20 13:05:56 +02:00
* @param start index to start filling the array at . If start is negative , it is treated as
* length + start where length is the length of the array .
* @param end index to stop filling the array at . If end is negative , it is treated as
2015-08-22 00:20:08 +02:00
* length + end .
* /
2016-05-20 13:05:56 +02:00
fill ( value : number , start? : number , end? : number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Returns the elements of an array that meet the condition specified in a callback function .
* @param callbackfn A function that accepts up to three arguments . The filter method calls
* the callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
2016-05-20 13:05:56 +02:00
filter ( callbackfn : ( value : number , index : number , array : Float64Array ) = > any , thisArg? : any ) : Float64Array ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
* Returns the value of the first element in the array where predicate is true , and undefined
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
* order , until it finds one where predicate returns true . If such an element is found , find
2015-08-22 00:20:08 +02:00
* immediately returns that element value . Otherwise , find returns undefined .
2016-05-20 13:05:56 +02:00
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-04-11 20:03:15 +02:00
find ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number | undefined ;
2015-08-22 00:20:08 +02:00
2016-05-20 13:05:56 +02:00
/ * *
2016-09-27 20:44:25 +02:00
* Returns the index of the first element in the array where predicate is true , and - 1
2015-08-22 00:20:08 +02:00
* otherwise .
2016-05-20 13:05:56 +02:00
* @param predicate find calls predicate once for each element of the array , in ascending
[Transforms] Merge master 07/11 into transform (#9697)
* Use merge2, gulp-if, gulp-newer, and more projects
* Add watch task
* Working non-inline sourcemaps for runtests
* browser tests now also loads sourcemaps from disk
* Lazypipes and better services stream management
* export interface used by other exported functions
* Make goto-definition work for `this` parameter
* Add new error for rest parameters
* Add error message for rest parameter properties
* Fix case when a document contains multiple script blocks with different base indentations.
Use the base indent size if it is greater that the indentation of the inherited predecessor
* Fix rwc-runner from breaking change in compiler (#9284)
* Signatures use JSDoc to determine optionality
* Changed implementation to use closure
* Updated tests
* Fixed linting error
* Adding Code of Conduct notice
* Don't crash when JS class property is self-referential.
Fixes #9293
* Remove stale baselines
* For optionality, check question token before JSDoc
* Accept rest parameter properties error baselines
* Change binding pattern parameter property error
* Accept binding pattern properties error baselines
* Lint
* Port the sync version diagnostics API from tsserverVS-WIP branch to 2.0
* Do copyright without gulp-if and lazypipe
* Change test comment and accept baseline
* Remove tsd scripts task from gulpfile
* Make use of module compiler option explicit, add strip internal to tsconfigs
* Remove Signature#thisType and use Signature#thisParameter everywhere
* Add Gulpfile lint to jake, fix lints
* Change reference tests to verify actual ranges referenced and not just their count
* Respond to PR comments
* Add new lint rule
* Fix object whitespace lints
* Fix case of gulpfile dependencies
* 1. pass subshell args 2. fix build order in services
1. /bin/sh requires its arguments joined into a single string unlike
cmd.
2. services/ depends on a couple of files from server/ but the order was
implicit, and changed from jakefile. Now the order is explicit in the
tsconfig.
* Fix single-quote lint
* Check for exactly one space
* Fix excess whitespace issues
* Add matchFiles test to Gulpfile
This was merged while the gulpfile was still in-progress
* Fix LKG useDebug task and newLine flag
* Update LKG
* Clean before LKG in Gulpfile
* Fix lint
* Correct the api string name
* Allow space in exec cmds
* Fix typo
* Add new APIs to protocol
* Fix bug where `exports.` was prepended to namespace export accesses
* Remove unnecessary parameter
* extract expression into function
* Add fourslash tests & address CR comments
* Fix 8549: Using variable as Jsx tagname (#9337)
* Parse JSXElement's name as property access instead of just entity name. So when one accesses property of the class through this, checker will check correctly
* wip - just resolve to any type for now
* Resolve string type to anytype and look up property in intrinsicElementsType of Jsx
* Add tests and update baselines
* Remove unneccessary comment
* wip-address PR
* Address PR
* Add tets and update baselines
* Fix linting error
* Unused identifiers compiler code (#9200)
* Code changes to update references of the Identifiers
* Added code for handling function, method and coonstructor level local variables and parameters
* Rebased with origin master
* Code changes to handle unused private variables, private methods and typed parameters
* Code changes to handle namespace level elements
* Code changes to handle unimplemented interfaces
* Code to optimize the d.ts check
* Correct Code change to handle the parameters for methods inside interfaces
* Fix for lint error
* Remove Trailing whitespace
* Code changes to handle interface implementations
* Changes to display the error position correctly
* Compiler Test Cases
* Adding condition to ignore constructor parameters
* Removing unnecessary tests
* Additional changes for compiler code
* Additional changes to handle constructor scenario
* Fixing the consolidated case
* Changed logic to search for private instead of public
* Response to PR Comments
* Changed the error code in test cases as result of merge with master
* Adding the missing file
* Adding the missing file II
* Response to PR comments
* Code changes for checking unused imports
* Test Cases for Unused Imports
* Response to PR comments
* Code change specific to position of Import Declaration
* Code change for handling the position for unused import
* New scenarios for handling parameters in lambda function, type parameters in methods, etc.
* Additional scenarios based on PR comments
* Removing a redundant check
* Added ambient check to imports and typeparatmeter reporting
* Added one more scenario to handle type parameters
* Added new scenario for TypeParameter on Interface
* Refactoring the code
* Added scenario to handle private class elements declared in constructor.
* Minor change to erro reporting
* Fix 8355: Fix emit metadata different between transpile and tsc --isolatedModule (#9232)
* Instead of returning undefined for unknownSymbol return itself
* Add Transpile unittest
* Wip - Add project tests
* Add project tests and baselines
* Update existed tests
* Add tests for emitting metadata with module targetting system
* Fix 8467: Fix incorrect emit for accessing static property in static propertyDeclaration (#8551)
* Fix incorrect emit for accessing static property in static propertyDeclaration
* Update tests and baselines
* Update function name
* Fix when accessing static property inside arrow function
* Add tests and baselines
* do not format comma/closeparen in jsxelement
* format jsx expression
* Remove extra baselines
* Fixed bugs and linting
* Added project tests for node_modules JavaScript searches
* Removed old TODO comment
* make rules optional
* Fixed the regexp for removing full paths
* Fix type of the disableSizeLimit option
* Update version to 2.0.0
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Remove unused compiler option (#9381)
* Update LKG
* Added emitHost method to return source from node modules
* Marked new method internal
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Port 9396 to release 2.0
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* Merge master into release-2.0 (#9400)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix #9402: Do not report unused identifier errors for catch variables
* getVarDate should be on the Date interface
* Defere checking unsed identifier checks
* Do not scan nodes preceding formatted region, just skip over them
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Use a deferred list to check for unused identifiers
* push checks to checkUnusedIdentifiersDeferred
* use isParameterPropertyDeclaration to test for paramter propoerties
* runtests-parallel skips empty buckets
Previously, it would enter them as buckets with no tests, which would
make our test runners run *every* test.
This was very obvious on machines with lots of cores.
* Report unused identifiers in for statements
* Do not check ambients, and overloads
* Add tests
* Consolidate type reference marking in getTypeFromTypeReference
* Handel type aliases
* Add tests
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Do not report unused errors for module augmentations
* Consolidate refernce marking in resolveName to allow marking aliases correctelly
* add tests
* Code review comments
* Only mark symbols found in a local symbol table
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Respond to PR comments
* Better name for test
* handel private properties correctelly
* Port 9426 to release 2.0
* Handel Swtich statements
check for locals on for statments
only mark private properties
* Removed one error to avoid full path issues
* Don't emit source files found under node_modules
(cherry picked from commit 5f8cf1af3e4be61037cbafd698535d32d292941f)
* Dont load JavaScript if types packages are present
(cherry picked from commit 5a45c44eb789f52ceb1aa0e23a230ecb599bfb08)
* Renamed API
(cherry picked from commit d8047b607f11cdf319284bb344282582c7c0aea0)
* Removed one error to avoid full path issues
(cherry picked from commit 5e4f13f342a75ec8f7cf65cb669bec9d6e6c5581)
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Fix #9458: exclude parameters starting with underscore from unusedParamter checks
* change variable name for strict mode
* Increase timeout from running RWC. As UWDWeb takes slightly longer now (#9454)
* Handle relative paths in tsconfig exclude and include globs
* Merge master into release branch 06/30 (#9447)
* do not format comma/closeparen in jsxelement
* format jsx expression
* make rules optional
* Remove upper boilerplate from issue template
Our issue stats did not improve appreciably when we added the issue template. Reduce upper boilerplate text and try to make it more action-oriented
* Update issue_template.md
* new options should be optional for compatibility
* Add getCurrentDirectory to ServerHost
* Add nullchecks for typeRoots, remove getCurrentDirectory from ServerHost as it is always the installation location
* VarDate interface and relevant Date.prototype members
* Fix 9363: Object destructuring broken-variables are bound to the wrong object (#9383)
* Fix emit incorrect destructuring mapping in var declaration
* Add tests and baselines
* Add additional tests and baselines
* Fix crash in async functions when targetting ES5.
When targetting ES5 and with --noImplicitReturns,
an async function whose return type could not be determined would cause
a compiler crash.
* Add This type to lib
* getVarDate should be on the Date interface
* Don't emit source files found under node_modules
* Destructuring assignment removes undefined from type when default value is given
* Add nullcheck when calculating indentations for implort clause
* Add test
* Dont load JavaScript if types packages are present
* Renamed API
* Use checkExpression, not checkExpressionCached
* Show "<unknown>" if the name of a declaration is unavailable
* Parse `export default async function` as a declaration
* Removed one error to avoid full path issues
* Fix incorrectly-saved quote symbols in ThirdPartyNoticeText.txt
* Improve names of whitespace functions
* Handle relative paths in tsconfig exclude and include globs
Port 9475 to release 2.0
* add new method getEmitOutputObject to return result of the emit as object with properties instead of json string
* fix linter
* Fix PromiseLike to be compatible with es6-promise (#9484)
* Fix reading files from IOLog because previous our API captures (#9483)
* Fix reading files from IOLog because previous our API captures
* Refactoring the ioLog
* Exclude FlowSwitchClause from flow graph for case expressions
* Add regression test
* Update LKG
* Update language in comment
* Add .mailmap file
* Add authors script to generate authors from repo
* Update AUTHORS.md for release-2.0
* Update script to pass more than one argument
* Remove the unused text buffer from ScriptInfo
* Fix #9531: account for async as an contextual keyword when parsing export assignments
* Update LKG
* Swap q from a reference to an import
* Fix #9550: exclude 'this' type parameters from unusedParameters checks.
* Update comment to reflect new dependency
* Avoid putting children tags in jsdoccomment
* Parse the result of getDirectories call
* Update harness getDirectories implementation for shims
* Fix multiple Salsa assignment-declarations
Previously, all assignment-declarations needed to be of the same kind:
either all `this.p = ...` assignments or `C.prototype.p = ...`
assignments.
* Test for multiple salsa assignment-declarations
* Add test for parsed @typedef tag node shape
* Provide a symbol for salsa-inferred class types
* Update .mailmap
* Fix module tracking
* Updated test with relative import
* Fixed the node tracking and a harness bug
* fixed lint error
* Fixed implicit any
* Added missing test files
* Removed duplicate logic
* Update conflicting baseline.
PR #9574 added a baseline that #9578 caused to be changed. The two PRs
went in so close to each other that the CI build didn't catch the change
to the new test's baseline.
* Fix type of JSXTagName
* Update baselines to use double-quote
* Update baselines when emitting metadata decorator
* Update baselines for async-await function
* Update baselines for comment in capturing down-level for...of and for...in
* Add missing Transpile tests
* Remove old JS transpile baselines
* Passing program as argument in emitWorker
* Port PR#9607 transforms
* Port new JSDOC tests to use baseline
* substitute alias for class expression in statics
* Address new lint warnings
* Change name for substitution function.
2016-07-19 00:38:30 +02:00
* order , until it finds one where predicate returns true . If such an element is found ,
2016-05-20 13:05:56 +02:00
* findIndex immediately returns that element index . Otherwise , findIndex returns - 1 .
* @param thisArg If provided , it will be used as the this value for each invocation of
2015-08-22 00:20:08 +02:00
* predicate . If it is not provided , undefined is used instead .
* /
2016-09-27 20:44:25 +02:00
findIndex ( predicate : ( value : number , index : number , obj : Array < number > ) = > boolean , thisArg? : any ) : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Performs the specified action for each element in an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . forEach calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
forEach ( callbackfn : ( value : number , index : number , array : Float64Array ) = > void , thisArg? : any ) : void ;
/ * *
* Returns the index of the first occurrence of a value in an array .
* @param searchElement The value to locate in the array .
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
* search starts at index 0 .
* /
indexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* Adds all the elements of an array separated by the specified separator string .
2016-05-20 13:05:56 +02:00
* @param separator A string used to separate one element of an array from the next in the
2015-08-22 00:20:08 +02:00
* resulting String . If omitted , the array elements are separated with a comma .
* /
join ( separator? : string ) : string ;
/ * *
* Returns the index of the last occurrence of a value in an array .
* @param searchElement The value to locate in the array .
2016-05-20 13:05:56 +02:00
* @param fromIndex The array index at which to begin the search . If fromIndex is omitted , the
2015-08-22 00:20:08 +02:00
* search starts at index 0 .
* /
lastIndexOf ( searchElement : number , fromIndex? : number ) : number ;
/ * *
* The length of the array .
* /
2016-02-23 21:53:52 +01:00
readonly length : number ;
2015-08-22 00:20:08 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Calls a defined callback function on each element of an array , and returns an array that
2015-08-22 00:20:08 +02:00
* contains the results .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The map method calls the
* callbackfn function one time for each element in the array .
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
map ( callbackfn : ( value : number , index : number , array : Float64Array ) = > number , thisArg? : any ) : Float64Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduce ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Float64Array ) = > number , initialValue? : number ) : number ;
/ * *
2016-05-20 13:05:56 +02:00
* Calls the specified callback function for all the elements in an array . The return value of
* the callback function is the accumulated result , and is provided as an argument in the next
2015-08-22 00:20:08 +02:00
* call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduce method calls the
2015-08-22 00:20:08 +02:00
* callbackfn function one time for each element in the array .
2016-05-20 13:05:56 +02:00
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an argument
2015-08-22 00:20:08 +02:00
* instead of an array value .
* /
reduce < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Float64Array ) = > U , initialValue : U ) : U ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
* the accumulation . The first call to the callbackfn function provides this value as an
2015-08-22 00:20:08 +02:00
* argument instead of an array value .
* /
reduceRight ( callbackfn : ( previousValue : number , currentValue : number , currentIndex : number , array : Float64Array ) = > number , initialValue? : number ) : number ;
2016-05-20 13:05:56 +02:00
/ * *
* Calls the specified callback function for all the elements in an array , in descending order .
* The return value of the callback function is the accumulated result , and is provided as an
2015-08-22 00:20:08 +02:00
* argument in the next call to the callback function .
* @param callbackfn A function that accepts up to four arguments . The reduceRight method calls
2016-05-20 13:05:56 +02:00
* the callbackfn function one time for each element in the array .
* @param initialValue If initialValue is specified , it is used as the initial value to start
2015-08-22 00:20:08 +02:00
* the accumulation . The first call to the callbackfn function provides this value as an argument
* instead of an array value .
* /
reduceRight < U > ( callbackfn : ( previousValue : U , currentValue : number , currentIndex : number , array : Float64Array ) = > U , initialValue : U ) : U ;
/ * *
2016-05-20 13:05:56 +02:00
* Reverses the elements in an Array .
2015-08-22 00:20:08 +02:00
* /
reverse ( ) : Float64Array ;
/ * *
* Sets a value or an array of values .
* @param index The index of the location to set .
* @param value The value to set .
* /
set ( index : number , value : number ) : void ;
/ * *
* Sets a value or an array of values .
* @param array A typed or untyped array of values to set .
* @param offset The index in the current array at which the values are to be written .
* /
set ( array : ArrayLike < number > , offset? : number ) : void ;
2016-05-20 13:05:56 +02:00
/ * *
2015-08-22 00:20:08 +02:00
* Returns a section of an array .
* @param start The beginning of the specified portion of the array .
* @param end The end of the specified portion of the array .
* /
slice ( start? : number , end? : number ) : Float64Array ;
/ * *
* Determines whether the specified callback function returns true for any element of an array .
2016-05-20 13:05:56 +02:00
* @param callbackfn A function that accepts up to three arguments . The some method calls the
* callbackfn function for each element in array1 until the callbackfn returns true , or until
2015-08-22 00:20:08 +02:00
* the end of the array .
2016-05-20 13:05:56 +02:00
* @param thisArg An object to which the this keyword can refer in the callbackfn function .
2015-08-22 00:20:08 +02:00
* If thisArg is omitted , undefined is used as the this value .
* /
some ( callbackfn : ( value : number , index : number , array : Float64Array ) = > boolean , thisArg? : any ) : boolean ;
/ * *
* Sorts an array .
2016-05-20 13:05:56 +02:00
* @param compareFn The name of the function used to determine the order of the elements . If
2015-08-22 00:20:08 +02:00
* omitted , the elements are sorted in ascending , ASCII character order .
* /
2016-05-20 13:05:56 +02:00
sort ( compareFn ? : ( a : number , b : number ) = > number ) : this ;
2015-08-22 00:20:08 +02:00
/ * *
* Gets a new Float64Array view of the ArrayBuffer store for this array , referencing the elements
2016-05-20 13:05:56 +02:00
* at begin , inclusive , up to end , exclusive .
2015-08-22 00:20:08 +02:00
* @param begin The index of the beginning of the array .
* @param end The index of the end of the array .
* /
subarray ( begin : number , end? : number ) : Float64Array ;
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current locale .
2015-08-22 00:20:08 +02:00
* /
toLocaleString ( ) : string ;
/ * *
* Returns a string representation of an array .
* /
toString ( ) : string ;
[ index : number ] : number ;
}
interface Float64ArrayConstructor {
2016-02-23 21:53:52 +01:00
readonly prototype : Float64Array ;
2015-08-22 00:20:08 +02:00
new ( length : number ) : Float64Array ;
new ( array : ArrayLike < number > ) : Float64Array ;
new ( buffer : ArrayBuffer , byteOffset? : number , length? : number ) : Float64Array ;
/ * *
2016-05-20 13:05:56 +02:00
* The size in bytes of each element in the array .
2015-08-22 00:20:08 +02:00
* /
2016-02-23 21:53:52 +01:00
readonly BYTES_PER_ELEMENT : number ;
2015-08-22 00:20:08 +02:00
/ * *
* Returns a new array from a set of elements .
* @param items A set of elements to include in the new array object .
* /
of ( . . . items : number [ ] ) : Float64Array ;
2016-05-20 13:05:56 +02:00
2015-08-22 00:20:08 +02:00
/ * *
* Creates an array from an array - like or iterable object .
* @param arrayLike An array - like or iterable object to convert to an array .
* @param mapfn A mapping function to call on every element of the array .
* @param thisArg Value of 'this' used to invoke the mapfn .
* /
from ( arrayLike : ArrayLike < number > , mapfn ? : ( v : number , k : number ) = > number , thisArg? : any ) : Float64Array ;
}
2016-02-23 21:53:52 +01:00
declare const Float64Array : Float64ArrayConstructor ;
2016-04-11 20:03:15 +02:00
/////////////////////////////
2016-05-20 13:05:56 +02:00
/// ECMAScript Internationalization API
2016-04-11 20:03:15 +02:00
/////////////////////////////
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 : {
2016-09-27 20:44:25 +02:00
new ( locales? : string | string [ ] , options? : CollatorOptions ) : Collator ;
( locales? : string | string [ ] , options? : CollatorOptions ) : Collator ;
supportedLocalesOf ( locales : string | string [ ] , options? : CollatorOptions ) : string [ ] ;
2016-04-11 20:03:15 +02:00
}
interface NumberFormatOptions {
localeMatcher? : string ;
style? : string ;
currency? : string ;
currencyDisplay? : string ;
useGrouping? : boolean ;
minimumIntegerDigits? : number ;
minimumFractionDigits? : number ;
maximumFractionDigits? : number ;
minimumSignificantDigits? : number ;
maximumSignificantDigits? : number ;
}
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 : {
2016-09-27 20:44:25 +02:00
new ( locales? : string | string [ ] , options? : NumberFormatOptions ) : NumberFormat ;
( locales? : string | string [ ] , options? : NumberFormatOptions ) : NumberFormat ;
supportedLocalesOf ( locales : string | string [ ] , options? : NumberFormatOptions ) : string [ ] ;
2016-04-11 20:03:15 +02:00
}
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 ;
timeZone? : string ;
}
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? : Date | number ) : string ;
resolvedOptions ( ) : ResolvedDateTimeFormatOptions ;
}
var DateTimeFormat : {
2016-09-27 20:44:25 +02:00
new ( locales? : string | string [ ] , options? : DateTimeFormatOptions ) : DateTimeFormat ;
( locales? : string | string [ ] , options? : DateTimeFormatOptions ) : DateTimeFormat ;
supportedLocalesOf ( locales : string | string [ ] , options? : DateTimeFormatOptions ) : string [ ] ;
2016-04-11 20:03:15 +02:00
}
}
interface String {
/ * *
2016-09-27 20:44:25 +02:00
* Determines whether two strings are equivalent in the current or specified locale .
2016-04-11 20:03:15 +02:00
* @param that String to compare to target string
2016-09-27 20:44:25 +02:00
* @param locales A locale string or array of locale strings that contain one or more language or locale tags . If you include more than one locale string , list them in descending order of priority so that the first entry is the preferred locale . If you omit this parameter , the default locale of the JavaScript runtime is used . This parameter must conform to BCP 47 standards ; see the Intl . Collator object for details .
2016-04-11 20:03:15 +02:00
* @param options An object that contains one or more properties that specify comparison options . see the Intl . Collator object for details .
* /
2016-09-27 20:44:25 +02:00
localeCompare ( that : string , locales? : string | string [ ] , options? : Intl.CollatorOptions ) : number ;
2016-04-11 20:03:15 +02:00
}
interface Number {
/ * *
2016-05-20 13:05:56 +02:00
* Converts a number to a string by using the current or specified locale .
2016-09-27 20:44:25 +02:00
* @param locales A locale string or array of locale strings that contain one or more language or locale tags . If you include more than one locale string , list them in descending order of priority so that the first entry is the preferred locale . If you omit this parameter , the default locale of the JavaScript runtime is used .
2016-04-11 20:03:15 +02:00
* @param options An object that contains one or more properties that specify comparison options .
* /
2016-09-27 20:44:25 +02:00
toLocaleString ( locales? : string | string [ ] , options? : Intl.NumberFormatOptions ) : string ;
2016-04-11 20:03:15 +02:00
}
interface Date {
/ * *
2016-05-20 13:05:56 +02:00
* Converts a date and time to a string by using the current or specified locale .
2016-09-27 20:44:25 +02:00
* @param locales A locale string or array of locale strings that contain one or more language or locale tags . If you include more than one locale string , list them in descending order of priority so that the first entry is the preferred locale . If you omit this parameter , the default locale of the JavaScript runtime is used .
2016-04-11 20:03:15 +02:00
* @param options An object that contains one or more properties that specify comparison options .
* /
2016-09-27 20:44:25 +02:00
toLocaleString ( locales? : string | string [ ] , options? : Intl.DateTimeFormatOptions ) : string ;
2016-04-11 20:03:15 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Converts a date to a string by using the current or specified locale .
2016-09-27 20:44:25 +02:00
* @param locales A locale string or array of locale strings that contain one or more language or locale tags . If you include more than one locale string , list them in descending order of priority so that the first entry is the preferred locale . If you omit this parameter , the default locale of the JavaScript runtime is used .
2016-04-11 20:03:15 +02:00
* @param options An object that contains one or more properties that specify comparison options .
* /
2016-09-27 20:44:25 +02:00
toLocaleDateString ( locales? : string | string [ ] , options? : Intl.DateTimeFormatOptions ) : string ;
2016-04-11 20:03:15 +02:00
/ * *
2016-05-20 13:05:56 +02:00
* Converts a time to a string by using the current or specified locale .
2016-09-27 20:44:25 +02:00
* @param locales A locale string or array of locale strings that contain one or more language or locale tags . If you include more than one locale string , list them in descending order of priority so that the first entry is the preferred locale . If you omit this parameter , the default locale of the JavaScript runtime is used .
2016-04-11 20:03:15 +02:00
* @param options An object that contains one or more properties that specify comparison options .
* /
2016-09-27 20:44:25 +02:00
toLocaleTimeString ( locales? : string | string [ ] , options? : Intl.DateTimeFormatOptions ) : string ;
2016-04-11 20:03:15 +02:00
}