* fix(49223): handle ExpressionWithTypeArguments nodes in isExpressionNode
* Update src/compiler/utilities.ts
* Just use `!isHeritageClause(node.parent)`.
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Remove undefined from source type of destructuring assignment with renaming
* add a test
* add test case from original issue
* add test with undefined default value
* add more test cases with const declaration
* changed error message for interface extending primitive type
* moved interface check to different function
* changed part of interface declaration to is extended by interface
Co-authored-by: harsheetkakar <harsheetkakar@bitbucket.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
* remove too-late fix
* Allow any property from a mapped type
* turn off error for any non-class base
* Also handle synthetic properties more laxly
Originally from #42635, but this version is simpler.
* update baselines
* Update baselines
* createUnionProperty of accessors creates an accessor
Seems simple and doesn't break much. I need to double-check the few test
failures, however.
* Fix computation of write type of accessors
* Calculate property-vs-accessor in existing loop
Instead of looping over the props list 3 more times.
* Undo synthetic accessor change
* Minimise diff
* fix RHS of for..of loop not evaluated when LHS is array binding element with OmittedExpression
* expand widened type check
* add more test cases
* update code with suggestions
* Make test target es2015
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Improve reduction of intersection types
* Accept new baselines
* Improve CFA for truthy, equality, and typeof checks
* Accept new baselines
* Remove special case for Function type
* Don't reduce intersections of form {...} & object
* Accept new baselines
* Anything is assignable to unknown-like union
* Accept new baselines
* Tweak subtype check
* Recombine unknown type from unknown-like union in more cases
* Display union origin only if it is shorter than union itself
* Accept new baselines
* Add tests
* Only attach origin type when it is shorter than union itself
* Specially preserve string & {}, number & {}, bigint & {}
* Accept new baselines
* Add additional tests
* Fix getNormalizedType and getNarrowableTypeForReference for intersections
* Switch NonNullable<T> to use T & {}
* Accept new baselines
* Use NonNullable<T> in place of anonymous T & {}
* Accept new baselines
* Add fourslash test
* More fourslash tests
* Fix getFalsyFlags handling of intersections
* Accept new baselines
* Add constraint to compareProperties type parameter
* Unconstrained type parameter not assignable to {} with strictNullChecks
* Accept new baselines
* More specific inference for constrained 'infer' types in template literal types
* PR feedback
* Add inference priority for template type placeholders
* Infer to a preferred constraint instead of a union
* Add reduceType
* Switch tests to use infer..extends
* Add missing primitive constraint cases
* Update .types tests
* Remove TemplateTypePlaceholderPriority
* Remove reduceType
* Port #48978 forward to the revised FAR code
The old regression test didn't catch the corresponding bug in the new code because it hit the fast path where there's only a single project.
* Drop spurious non-null assertion
* Handle the case where the FAR results map is empty
Searching exactly one project does not imply the presence of exactly one references list.
Fixes#49217
* Use emptyArray
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
Co-authored-by: Sheetal Nandi <shkamat@microsoft.com>
* Add failing test
* Fix the implicit glob key so that recursive keys are not differing just by directory seperator
Fixes#49078
* Reset the reload level once program is loaded
* fix(47562): Add option to suppress type hint if variable name matches type
* Remove the unnecessary debug code
* Re-run gulp runtests
* Use equateStringsCaseInsensitive to compare strings
* Handle timesouts to reflect the time it was set with
* Remove unused internal calls from solution builder
* If the project doesnt need building or updating bundle, dont schedule it but do it right away
* Reduce the time between project builds to 100ms
* Some tests for projects building
* Schedule builds such that when change is not detected 5 projects are built at a time
* Fix tests in main
* Add es2018.intl ref to es2020.intl
es2020.intl refers to NumberFormatPartTypes declared in es2018.intl
as of #46508.
I'm not sure how to test this; it repros on Definitely Typed in
types/ndarray, but when I copy the same files into a compiler test it
passes without a problem.
* Add a test that shows the change works
It doesn't actually show that the original bug has been fixed,
though.