https://github.com/thoughtscript/typescript_classes
Testing Typescript inheritance problems
https://github.com/thoughtscript/typescript_classes
destructuring inheritance typescript
Last synced: 6 months ago
JSON representation
Testing Typescript inheritance problems
- Host: GitHub
- URL: https://github.com/thoughtscript/typescript_classes
- Owner: Thoughtscript
- Created: 2022-04-16T16:05:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-16T16:24:24.000Z (almost 4 years ago)
- Last Synced: 2023-12-04T23:56:11.372Z (about 2 years ago)
- Topics: destructuring, inheritance, typescript
- Language: TypeScript
- Homepage:
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# README
[](https://www.typescriptlang.org/)
Exploring how Typescript handles `this` vs. `super` in the most recent build.
Also destructuring keys.
## Super vs. This
Should be allowed. `this.method()` called on a subclassed class (where `method()` is on the inherited super class) should execute without issue (provided `this` is bound to the superclass via `super`).
> I think there's a strong preference for `super.method()` now instead to avoid ambiguities.
> `this` and `super` both work.
## String Literal Keys
Sometimes using a special character is needed for a key in a type/interface.
Tests to see what's allowed or not.