* Add this-parameter workaround to Array.filter
Allows anys.filter(Boolean) to once again return any[], not unknown[].
* Add any constraint to Boolean factory function
I want to test how well this works.
* Remove Boolean factory type guard
* Remove typeGuardBoolean test
* Forbid accessing const & let on globalThis
It's just an error; you still get the type of the property.
* Disallow access of blockscoped vars on globalThis
Also change Array, Function, String, et al from `const` to `var` so that
they remain accessible via `globalThis.String`.
* Update baselines after lib.d.ts change
Note especially the change in redefineArray, which is now allowed as
long as you provide a type that is assignable to ArrayConstructor.
* Remove blockscoped vars from typeof globalThis
Unlike forbidding them, this removes the properties entirely.
Unfortunately, this means that accessing these properties is only an
error with noImplicitAny, and that error is quite confusing.
Let's discuss our options. I see 3:
1. Forbid access of block-scoped vars as properties (in all flag
settings), but leave them on the type. Simple to implement.
2. Remove block-scoped vars from the globalThis type. Has the bad
error/flag behaviour described above, but simple to implement.
3. Remove block-scoped vars from the globalThis type. Also, forbid
accessing them by executing another resolveName lookup for failed
property accesses on globalThisSymbol. If the second lookup returns a
blockscoped var, issue an error instead of falling back to the index
signature. This seems too complex to me.
* Update baselines
* Better error for block-scoped usage on globalThis
So that value-space references have as clear an error as type-space
references.
* Update fourslash tests
* Fix semi-colon lint
* Don't copy so much when filtering blockscoped vars
* Overloads in Array.concat now handle ReadonlyArray
Previously it was union types, which is slower.
* Make arrayConcat3 test stricter
* Switch to InputArray instead of adding overloads
* Update baselines
* Update baselines correctly
* Rename to ConcatArray and add slice method
Should make it, respectively, easier to understand this specific type
and harder to satisfy it by mistake.
* add types for escape and unescape methods #18813
although the issue is marked working as expected, it is important to mention that most major browsers maintain support for escape and unescape, and some javascript codebases moving to typescript may have escape and unescape in them. They are valid JavaScript, and thus they should be included in the global definition.
* add escape and unescape types to lib in tests
* update tests to turn CI green
* Follow up on #16223, Remove generic signatures from Array, ReadOnlyArray and TypedArrays
* Remove test
* Accept baselines
* Remove invalid `this: void` in callbacks
* accept baselines