Commit Graph
100 Commits
Author SHA1 Message Date
Wesley Wigham 293816875c Support some late-bound special property assignments (#33220)
* Support some late-bound special property assignments

* Integrate PR feedback

* PR feedback

* Enable declaration on core tests

* Specialize type of binary expression used for late binding, speculative fix to navigation bar, merge check and type for elem/property accesses

* Add test showing current nav bar behavior (specifically the lack thereof)
2019-09-27 13:54:50 -07:00
Wesley Wigham 558ece72cb Add support for capturing cpu profiles into tsc itself (#33586)
* Add support for capturing cpu profiles into tsc itself

* Accept baseline for new compiler option in showConfig

* Fix lints

* Support profiling build mode, only ever have one live profiling session

* Minor modification to enable/disable semaphore, accept re-cased baseline

* Add pid into autognerated cpuprofile path

* Rename to fix case

* Sanitize filepaths in emitted cpuprofile for easier adoption by enterprise people, add inspector to browser field
2019-09-27 13:34:44 -07:00
Wesley Wigham 8d7fd2e691 Respect //@ts-nocheck in TS files (#33383) 2019-09-27 12:06:05 -07:00
Wesley Wigham 61cb06ce40 Allow allowJs and declaration to be used together (#32372)
* Allow allowJs and declaration to be used together

This intorduces a new symbol-based declaration emitter - currently this
is only used for JSON and JavaScript, as the output is likely worse than
what the other declaration emitter is capable of. In addition, it is
still incomplete - it does not yet support serializaing namespaces.

* Add tests for various import/export forms, add notes on export as namespace and fix export * from

* Tests & fixes for computed names

* Add test with current @enum tag behavior

* fix declaration emit for jsdoc @enum tags

* Small adjustments to base class serialization to fix bugs in it

* Guard against type/type parameter confusion when using typeParameterToName a bit

* Integrate feedback from PR

* Fix issue with export= declarations visibility calculation and type declaration emit that impacted all forms of declaration emit

* Only make one merged getCommonJsExportEquals symbol for a symbol

* Support preserving type reference directives in js declarations

* Skip declare mdoifiers for namespace members in ambient contexts

* FAKE ALIASES AND NAMESPACES EVERYWHERE

* Dont do namespace sugar when type members contain keyword names

* Fix json source file export modifier under new output

* Such clean nested aliasing, very wow

* Fix lint

* Add visibility errors, reuse type nodes where possible

* Suppoer having correctly named import types in bundled js declaration emit & adjust binding to allow namespaces with aliases to merge when the aliases look to be type-only

* Better support for module.exports = class expression

* Fix discovered crash bug

* Allow export assigned class expressions to be reachable symbols from external declarations

* Add missing semicolon

* Support @enum tag post-merge

* preserve comments on signatures and declarations where possible

* Basic support for js classy functions

* Add example we should do better with

* Prototype assignments make things a bit wonky, but the example from the PR seems OK

* Make a ton of changes to support the new way js classes are bound

* Remove some old comments, fix import and export default names

* Fix bug in object define handling and add tests for object define property declaration emit

* Fix organization nits from PR comments

* Preserve comments from jsdoc declarations on properties and js declaration type aliases

* Merge export declarations with identical specifiers

* Remove completed TODO comment

* Split lint

* Remove now-unused function

* PR feedback

* Add some project references tests, remove some checks from project refs codepaths that are now invalid

* Update project references tests again

* Merge and update project references tests

* Rename case

* Update test to include declaration output

* Remove yet another project refernces redirect extension check

* Update comment

* Add additional import ref to test

* Add shorthand prop to test

* Fix comment text

* Extract var to temp

* Simplify function and add whitespace

* Update project refs test to use incremental edit entry

* Stylistic refactors in the symbol serializer

* Another round of PR feedback, mostly style, small bugfix with constructors, and test showing bug in export assigned class expression name shadowing

* Use x instead of index
2019-09-26 14:27:16 -07:00
Wesley Wigham 62a43576b3 Enable eslint cache (#33619) 2019-09-26 13:44:10 -07:00
Wesley Wigham 00a43d7b49 Cache propagating variance flags in the relationship cache (#32225)
* Cache propagating variance flags in the relationship cache

* Convert base fields in relation comparison result to flags
2019-09-23 16:55:19 -07:00
Wesley Wigham 367b82055c Hoist and distribute type parameter constraints over type parameters … (#33453)
* Hoist and distribute type parameter constraints over type parameters when comparing against union targets when fetching union constraints

* Fix PR nits
2019-09-23 16:52:03 -07:00
Wesley Wigham 26caa3793e Introduce flattened error reporting for properties, call signatures, and construct signatures (#33473)
* Introduce flattened error reporting for properties, call signatures, and construct signatures

* Update message, specialize output for argument-less signatures

* Skip leading signature incompatability flattening

* Add return type specialized message
2019-09-23 16:08:44 -07:00
Wesley Wigham 6c2ae12559 Relax the constraints of isValidBaseType to allow base types to be constructor types (#33146)
* Relax the constraints of isValidBaseType to allow base types to be constructor types

* Fix nit

* Reduce confusion between isConstructorType and isValidBaseType

* Update comment
2019-09-23 15:58:03 -07:00
Wesley Wigham 5e06bea481 getConstraintDeclaration gets the first declaration with a constraint… (#33426)
* getConstraintDeclaration gets the first declaration with a constraint, rather than just the first declaration

* Add type annotation

* Update comment
2019-09-18 13:56:24 -07:00
Wesley Wigham 683e281040 Reintroduce cloneInferredPartOfContext to fix overloaded inferences with returnMappers (#33478) 2019-09-18 13:14:39 -07:00
Wesley Wigham 56e2cb31ad Reverse mapped types should have inferable indexes if their source had an inferable index (#33450) 2019-09-17 15:36:00 -07:00
Wesley Wigham 038d95144d Remove all submodules - just force clone and reset on run instead (#33425) 2019-09-13 16:14:33 -07:00
Wesley Wigham a93298665c Add heuristic for extracting irreducible null and undefined types from intersections of unions (#33150) 2019-09-06 11:32:22 -07:00
Wesley Wigham 72bb4c2bdc Mark deep indexed access comparisons as expanding (#33144)
* mark deep indexed accesses as deeply nested in comparisons

* Add test derived from lodash example
2019-09-04 17:00:55 -07:00
Wesley Wigham 2b153fc75a Add browser field entries for all require calls in sys.ts (#33242) 2019-09-04 16:59:16 -07:00
Wesley Wigham 3109b646a6 Elevate mapped types over type parameters in the same way as naked type parameters in intersection inference prioritization (#33223) 2019-09-04 16:23:08 -07:00
Wesley Wigham f8f8876832 Handle browserify-ignored module result for etw logger (#33225) 2019-09-04 11:44:10 -07:00
Wesley Wigham 219a570a75 Fix discovery and execution of root-level tests in the parallel runner (#32980) 2019-08-20 17:18:31 -07:00
Wesley Wigham a34ac8084c Walk up parenthesized type nodes when looking for the type alias hosting a node (#32924) 2019-08-20 16:43:06 -07:00
Wesley Wigham fd1e22bbf1 Instantiate generic conditional infer source types in the context of the target conditional (#31545)
* Instantiate generic conditional infer source types in the context of the target conditional

* Add test case from #26627
2019-08-19 13:01:08 -07:00
Wesley Wigham d9f0212324 Resolve SymbolFlags.Type only at first in jsdoc getTypeFromTypeReference (#32947)
* Fix lookup of exported eunm type alias in local scope in JS

* Fix by adjusting type lookup fallback behavior to not include SymbolFlags.Value in its initial lookup instead
2019-08-19 11:31:47 -07:00
Wesley Wigham 0212e2427c Add more info to the readme on the topic of the runtests command (#32942)
* Add more info to the readme on the topic of the `runtests` command

* Update README.md
2019-08-16 14:36:36 -07:00
Wesley Wigham d304049e0c Run user test submodule update in the correct directory (#32921) 2019-08-16 14:22:21 -07:00
Wesley Wigham 786e36ecaf Right. Environment variable on windows should be uppercase. 2019-08-16 14:17:03 -07:00
Wesley Wigham 1b46d8fd8f Lowercase M to m in all reference to the microsoft github org (#32938) 2019-08-16 13:12:25 -07:00
Wesley Wigham e145f322d8 Add produceLKG flag to cherry-pick PR script 2019-08-16 13:01:18 -07:00
Wesley Wigham 1747ee7a55 Perfer the non-module name of a symbol when writing the name of a symbol (#32880) 2019-08-14 17:16:17 -07:00
Wesley Wigham 602966ba4e Fix references to path-mapped ambient modules in declaration files (#32878)
* Fix references to path-mapped ambient modules in declaration files

* Fix lint
2019-08-13 16:34:03 -07:00
Wesley Wigham 4ab85bbf35 Add error message for keywords with escapes in them (#32718)
* Add error message for keywords with escapes in them

* Move check into parser during advance to next token to utilize context for contextual keywords

* git add .

* Add tests for extended escapes

* Better error courtesy of @DanielRossenwaser

* Add test of browser-inconsistent case and alter condition to match spec

* Merge adjacent conditions

* Use seperate functions for checking keywords vs not

* Use flags to track unicode escape presence

* Adjust error text
2019-08-12 16:00:38 -07:00
Wesley Wigham f2719f95b4 Allow functions and ambient classes to merge (#32584) 2019-08-09 16:10:10 -07:00
Wesley Wigham abd127f308 Only check import = reference when target is Value (#32747) 2019-08-06 16:44:42 -07:00
Wesley Wigham f333684179 Fix unicode escapes in jsx identifiers and extended unicode characters in jsdoc (#32716)
* Fix unicode escapes in jsx identifiers and extended unicode characters in jsdoc

* Support unicode escapes in JSDoc

* Add tests for extended escapes
2019-08-06 15:14:32 -07:00
Wesley Wigham d00056f096 Support extended unicode escapes in identifiers, per es6 spec (#32725) 2019-08-06 14:43:41 -07:00
Wesley Wigham 7adc175dfc Adjust isIdentifierText to skip multiple characters when a code point is multiple chars long (#32720)
* Adjust isIdentifierText to skip multiple characters when a code point is multiple chars long

* Add a few examples with mixed unicode characters

* for posterity, add some unicode cursive script characters

* Test some more planes more explicitly
2019-08-05 23:37:26 -07:00
Wesley Wigham 3b54ffcf0e Preserve const enums should keep import refs (#28498)
* Preserve const enums should keep import refs

for exported const enums exported via export default

Move some functionality around, small cleanup

Remove unneeded const enum check

* Only mark const enums as references with preserveConstEnums on in export assignments

* Limit change to declarations and preserveConstEnums mode
2019-08-05 16:47:29 -07:00
Wesley Wigham 6b4f730535 Fix binding of jsdoc typedefs with no in-comment name attached to an expression statement (#32610)
* Fix binding of jsdoc typedefs with no in-comment name attached to an expression statement

* Check toplevel flag before bind

* Small renames
2019-08-02 16:14:19 -07:00
Wesley Wigham acdbd10626 Amend scanner to support astral characters in identifiers when parsing es6+ (#32096)
* Amend scanner to support astral characters in identifiers when parsing es6+

* Use charSize helper rather than one-off maybe advance helper

* Update script to emit informative comment, run in unicode 12.1 environment

* Add suggested change
2019-08-02 13:15:51 -07:00
Wesley Wigham 00a75c4283 Retarget to es6 and fix the resulting bugs (#32221)
* Retarget to es6 and fix the resulting bugs

* Set target back to es5

* Fix typos in declaration emitter
2019-08-01 14:23:57 -07:00
Wesley Wigham b963e1a2a7 Update LKG (#32578)
* Update LKG

* Add @types/node version bump

* Small paatches/casts to be compatible with latest node

* Accept API baseline update

* Make internal NodeBuffer compatable with latest Buffer

* Why do we even have an internal buffer type

* Sync up internal buffer type better

* Fix lint

* Readd mroe missing Buffer methods
2019-07-29 10:33:43 -07:00
Wesley Wigham 2a4930f4ec Bind a jsdoc enum as SymbolFlags.TypeAlias and not SymbolFlags.Enum (#32520)
* Bind a jsdoc enum as SymbolFlags.TypeAlias and not SymbolFlags.Enum

* Actually include an @enum tag as a declaration

* Add enum tag refs into a couple more syntax kind lists

* accept symbol baseline update
2019-07-26 13:57:22 -07:00
Wesley Wigham 40fd4efdf6 Strip more kinds of timestamps and versions from dockerfile output (#32519)
* Strip more kinds of timestamps and versions from dockerfile output, rewrite office-ui-fabric dockerfile to use new lerna build system

* Add another filter for just output

* Update user baselines (#23)

* Update user baselines (#24)

* Strip only maybe-present timestamps

* More lenient timestamp filter

* Update user baselines (#25)

* Simplify and enhance vscode dockerfile to use nightly ts in ts extension, too

* Update user baselines (#26)

* Update user baselines (#27)
2019-07-23 17:14:50 -07:00
Wesley Wigham 37f2e5972f Cache & widen assigned js prototype type (#32381) 2019-07-12 12:49:34 -07:00
Wesley Wigham 6839973bf7 Generate a unique type parameter name for each nested type parameter (#31544)
* Generate a unique type parameter name for each nested type parameter

* Add testcase from 31605

* Fix typo

* Liiiiiine eeeendingggggss
2019-07-10 17:12:20 -07:00
Wesley Wigham daf0a73346 Fix lookup of optional methods in declaration emit (#32094) 2019-07-10 16:39:07 -07:00
Wesley Wigham 0bea4bd3c9 Widen object literal this types (#32240) 2019-07-03 15:58:21 -07:00
Wesley Wigham 3e6856137a Add support for sharding tests across multiple workers (#32173)
* Add support for sharding tests across multiple workers

* Disable unittests when runners are expressly provided (unless they contain the unittest runner)
2019-07-01 14:56:57 -07:00
Wesley Wigham 055a07ea4a Check for parse errors in emitted JS (#32009) 2019-07-01 14:15:30 -07:00
Wesley Wigham 3765651d82 Fix not emitted statement in then clauses producing syntactically invalid output (#32010)
* Fix not emitted statement in then clauses producing syntactically invalid output

* Refactor to common code, apply to all embedded statements
2019-07-01 13:39:18 -07:00
Wesley Wigham ff81d5261e Elide the exact node version rush complains about from the docker output (#32204) 2019-07-01 13:13:44 -07:00
Wesley Wigham 4382d7e7b2 Fix strict bugs in user pr script 2019-07-01 11:10:43 -07:00
Wesley Wigham cfe4cbd7b7 Merge branch 'master' of github.com:Microsoft/TypeScript 2019-06-28 13:35:01 -07:00
Wesley Wigham c25088c6bf make prnums for experiments get pulled from GH tags 2019-06-28 13:34:46 -07:00
Wesley Wigham b4a1a5996f Rework declaration emit visibility calculation for namespaces (#32156)
* Rework declaration visibility for namespaces

* Accept skipped baselines
2019-06-28 13:23:15 -07:00
Wesley Wigham 6760a03cec Add vscode docker test (#32152)
* Add vscode docker test

* Remove PID-log line

* Update user baselines (#18)
2019-06-28 13:22:25 -07:00
Wesley Wigham 2af8ac73ff Add xterm test to docker suite (#32149) 2019-06-27 15:29:22 -07:00
Wesley Wigham b3d55d0cd8 Add throw on not rebaseable to unmatched PRs, too 2019-06-26 16:01:51 -07:00
Wesley Wigham 1479bb6bc8 Check if triggering PR is in triggered set only if triggered pr exists (otherwise is master sync) 2019-06-26 15:38:45 -07:00
Wesley Wigham 34eb5ddf75 Fix tuple and array comparisons during identity checking (#32089) 2019-06-25 20:56:41 -07:00
Wesley Wigham a150d55592 Explicitly error when an exclude is provided by a test as it will be unused (#32014) 2019-06-24 15:29:02 -07:00
Wesley Wigham 9d23ce3d06 Sanitize rush progress numbers in docker test output (#32029) 2019-06-21 14:49:43 -07:00
Wesley Wigham 5498f583f9 Update cherry-pick pr script to use mergebase (#32031) 2019-06-21 14:34:26 -07:00
Wesley Wigham 1cbace6eee Remove secondary reference lookup implementation (#32016)
* Remove secondary reference lookup implementation

* Remove TODO
2019-06-21 13:26:29 -07:00
Wesley Wigham 37b20f6afd Eliminate references to defunct LSHost in comments (#32018) 2019-06-20 19:11:46 -07:00
Wesley Wigham a97c18f227 Ignore identifier declarations when calculating symbol visibility (#31974) 2019-06-20 17:20:12 -07:00
Wesley Wigham f2735b5a06 Fake up a namespace enclosing declaration when generating expando namespace members (#31971)
* Fake up a namespace enclosing declaration when generating expando namespace members

* Fix #31676
2019-06-20 12:58:16 -07:00
Wesley WighamandNathan Shively-Sanders c39a877a92 Add dockerfile based tests for azure-sdk-for-js and office-ui-fabric-react (#31948)
* Add dockerfile based tests

* Update tests/cases/docker/README.md

Co-Authored-By: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

* Combine sanitize functions

* Add some debugging instructions to README

* Fix listed command order
2019-06-20 12:47:57 -07:00
Wesley Wigham 74c6bc1f85 Filter primitives from union when checking for mismatched excess props if nonprimitive type is present (#31708)
* Filter primitives from union when checking for mismatched excess props if nonprimitive type is present

* Use maybeTypeOfKind
2019-06-12 17:31:57 -07:00
Wesley Wigham e6fde9e809 Taking typos out one line at a time 2019-06-05 16:24:02 -07:00
Wesley Wigham 96a250502c Deleting a branch that does not exist does not work (we should never download the ref anyway) 2019-06-05 16:12:21 -07:00
Wesley Wigham dcf2fa930d merge -> rebase in experiment sync script text 2019-06-05 15:28:52 -07:00
Wesley Wigham bddcf10eb8 Fix deprecation warnings in experiment sync script 2019-06-05 15:25:33 -07:00
Wesley Wigham 16030663ff Dont clean - pipeline should already be clean and a clean will clean node_modules 2019-06-05 15:18:00 -07:00
Wesley Wigham ec4ca6b619 Slightly reorder experimental sync commands 2019-06-05 14:58:22 -07:00
Wesley Wigham 9da05243ff Rewire experimental update script to handle PR triggers 2019-06-03 16:06:35 -07:00
Wesley Wigham 49c44f650a Add script for pack response postback (#31748) 2019-06-03 15:24:35 -07:00
Wesley Wigham 41ce98b440 Propagate saved variance flags from cached comparisons (#31688)
* Propegate saved variance flags from cached comparisons

* Propegate variance a bit more selectively

* Add test

* Remove now-redundant code

* Fix misspelling and remove unneeded branch
2019-05-31 16:11:08 -07:00
Wesley Wigham a23ae4c742 Dedent message so its not code-blocked 2019-05-31 14:54:36 -07:00
Wesley Wigham 22348d8a0c Reverse log order 2019-05-31 14:46:33 -07:00
Wesley Wigham 2cd3500197 origin/master because ref is fetched not pulled 2019-05-31 14:45:06 -07:00
Wesley Wigham 619648e8c2 Trim whitespace, fetch origin master 2019-05-31 14:36:39 -07:00
Wesley Wigham 8813ceb3ce Cant use stdio inherit and stash a result away 2019-05-31 14:24:49 -07:00
Wesley Wigham 9a2957717e Strictify the cherry-pick pr script 2019-05-31 14:12:45 -07:00
Wesley Wigham cb2df757d7 Add initial edition of cherry-pick script (#31705) 2019-05-31 13:42:15 -07:00
Wesley Wigham 1fe9a0ad4e Small fix to user PR script (#31679) 2019-05-30 15:20:41 -07:00
Wesley Wigham cd09cbbd5e Cache widened types (#31586)
* Cache widened types

* Fix lint
2019-05-28 13:13:46 -07:00
Wesley Wigham e70f2af25d Defer union or intersection property type normalization (#31486)
* Defer union or intersection property type normalization

* Accept moved span
2019-05-28 10:51:47 -07:00
Wesley Wigham bb4080c175 Collect _all_ symlinks a file may have witnessed when attempting to generate specifiers (#31571) 2019-05-23 17:17:24 -07:00
Wesley Wigham 07d850cf1c Prevent type parameter printing from recuring on the same symbol (#31453) 2019-05-20 16:43:55 -07:00
Wesley Wigham 3885e3fcda Fix error message regressed by #30916 (#31276) 2019-05-14 16:58:06 -07:00
Wesley Wigham f140dfc30b Chain RHS narrowing and truthiness narrowing in assignment expression narrowing (#31348) 2019-05-13 14:41:33 -07:00
Wesley Wigham 8ba53b6fd5 Simplify conditionals upon comparison, rather than instantiation 2019-05-13 11:18:28 -07:00
Wesley Wigham b7fe99a88c Instantiate constraint with default upon comparison (#31240) 2019-05-11 16:40:23 -07:00
Wesley Wigham d8f2702a5d Cache control flow results across invocations (#31003)
* Modify flow loop cache key to include all inputs

* Add test case, cache similarly to loop cache, reuse loop cache key (now corrected)

* Use simpler singleton key and type cache for FlowAssignment nodes
2019-05-10 11:48:44 -07:00
Wesley Wigham b365e657d4 Add unmeasurable variance kind for marking types whose variance result is unreliable (#30416)
* Add unmeasurable variance kind for marking types whose variance result is unreliable

* Remove now-unneeded nongeneric checks

* Add rule allowing `Readonly<any>` to be `any` instead of `{readonly [index: string]: any}`

* All Unmeasurable variances to still shortcut structural comparisons in some cases

* Separate unmeasurable from unreliable to reduce the impact of this change, for now

* Fix lint

* Remove Readonly<any> -> any callout

* Add fix for circularity error triggered by deep signature return type comparisons with `this` types
2019-05-03 14:42:17 -07:00
Wesley Wigham 60346b56a8 Do not request reviewers for fork-triggered PRs, just mention them 2019-04-05 18:29:30 -07:00
Wesley Wigham 73616c9725 More conditional linkage in user PR responses when manually triggered 2019-04-05 17:52:24 -07:00
Wesley Wigham 0ddd847e03 Small addition to user PR script to support fork/branch PRs 2019-04-05 16:28:25 -07:00
Wesley Wigham 74d41b926a Fix crash in watch-local 2019-01-25 10:55:24 -08:00
Wesley Wigham fdeb8f01df Fix typo in runner selection in gulp 2019-01-24 12:58:46 -08:00