Static TypeScript semantics: browser and hardware disagree
Open
@mmoskal is already working on this.
Since Oct 11, 2019.
bug
static typescript
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
Static TypeScript has a number of runtime checks that are not done in JavaScript/TypeScript. Right now, the compilation to native code defines the runtime checks, but the compilation to JavaScript doesn't have the same set of checks. One example is below. We should do a sprint to bring the two into agreement. Let's use this issue to document the differences.
Here is one example (classes in STS are not extensible, but it works in JavaScript backend):
class Foo {
constructor(public x: number = 1) { }
}
let foo = new Foo()
let bar = <any>foo
bar["z"] = 3
TODO:
- add runtime tag checks to JavaScript
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.