* Support xml namespace prefix for JSX elements and attributes
Just as with the `-` character, `:` is now also treated specially in JSX
element and attribute names, but is only allowed a single time, and not
at the beginning or end of the name, as is specified in the JSX spec.
All tests in jsxInvalidEsprimaTestSuite still fail, but for slightly
different reasons now. Two lines in jsxEsprimaFbTestSuite were
uncommented as they included elements with namespaces, and they now pass
without error.
* Add case for colons at ends of identifier
* Add case for jsx namepsace intrinsics
* Add cases with upcase idents for jsx namespaces
* Add case for jsx namespaces with react option
* Always consider jsx names with colon to be intrinsics
* Adjust comment about chars valid in jsx names but not js idents
* Fix minor typo in namespace prefix test case variable name
* Remove misleading comments on isUnhyphenatedJsxName
```js
const x = require('./foo').y
```
was incorrectly using the unmangled require path as the temp name in
emit:
```
import ./foo_1 = require('./foo')
import x = ./foo_1.y
```
It now uses the imported identifier:
```
import x_1 = require('./foo')
import x = x_1.y
```
Discovered while fixing #37832
* fix(lib): SharedArrayBuffer does not have a `length` field
* Revert formatting change.
* test: add tests for SharedArrayBuffer.length
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
* Fix reference types in @typedef
Previously this code path was broken and untested. Fortunately the fix
is simple.
* add test case from #40234
* update baselines
* Ensure whitespace jsx elements are not counted when determining if a jsx child is the only child
* Use filtered children count for deciding constructor used
* Accept updated baselines post-merge
* Fix noUncheckedIndexedAccess for tuple rest elements
* Defer inclusion of undefined for generic indexed access types
* Create separate IndexedAccessTypes depending on whether --noUncheckedIndexedAccess applies
* Undo accidental export
* Parenthesize for clearer precedence
* Fix default-property-assignment decls+prototype property decls
The check in getAssignedClassSymbol forgot to allow for default-property
assignment declarations, in part because it wasn't using a utility
function to do so.
* small cleanup
* make allowDeclaration parameter required
When a union is spread into a union, the sizes are multiplied,
potentially resulting in an enormous union (especially if there are
repeated spreads). This check detects cases that used to run out of
memory.
Fixes#40754
* Allow pattern literal types like `http://${string}` to exist and be reasoned about
* Allow bigint, number, null, and undefined in template holes
* Add test of the trivia case
* Handle `any` in template holes, add assignability rules for template -> template relations
* Explicitly test concatenated patterns
* PR Feedback
* Fix error on duplicate commonjs exports
Previously, the code missed setting the parent pointer for the lhs
access expression.
Also add declaration emit of element access expressions, missed in my
previous PR.
* Switch to excludes=None, add test case
CommonJS exports have None excludes, but still have an error issued by
the checker. This is the previous behaviour even though it would be nice
to add some exclusions.
* Initial implementation + tests
* linty
* Support destructuring declarations and assignments
* lint
* Fix destructuring assignment and element access into known properties
* Update baselines
* Rename flag to unUncheckedIndexedAccess
* Add test for unique symbol indexing
* Fix flag order in baselines
Co-authored-by: Andrew Branch <andrew@wheream.io>
* Adds support for declaring the bundled name of a dts module export
Co-authored-by: Wesley Wigham <wwigham@gmail.com>
* Adds baselines
* Update the tests
* Try to reduce the scope of the bundledPackageName error
* Use the flag in more baselines
* Get it green
* More tests
* Handle more feedback
* More test cleanup
* Set the moduleResolution for the tsconfigs
Co-authored-by: Wesley Wigham <wwigham@gmail.com>