- 💼 Frontend Engineer @ Accenture Song
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyWebComponent extends HTMLElement {...} | |
window.customElements.define('my-web-component', MyWebComponent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1 align="center">Hey there, I'm Marius 👋</h1> | |
<p align="center"> | |
<img src="https://komarev.com/ghpvc/?username=MariusBongarts&label=Profile+Views" /> | |
</p> | |
<img align='right' src="https://media.giphy.com/media/M9gbBd9nbDrOTu1Mqx/giphy.gif" width="230"> | |
- 💼 Frontend Engineer @ Accenture Song |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"target": "es2022", | |
"lib": ["es2022", "esnext.decorators", "dom"] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Symbol.metadata ??= Symbol("Symbol.metadata"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Context { | |
name: string; | |
metadata: Record<PropertyKey, unknown>; | |
} | |
function setMetadata(_target: any, context: Context) { | |
context.metadata[context.name] = true; | |
} | |
class SomeClass { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare let array: string[] | number[]; | |
array.filter(x => !!x); | |
// ~~~~~~ error! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ❌ error before Typescript 5.2 | |
type MixedTupleRest = [first: string, ...string[]]; | |
// ✅ fixed with label | |
type MixedTupleRestFixed = [first: string, ...rest: string[]]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ❌ error before Typescript 5.2 | |
type MixedTuple = [first: string, string]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type UnlabeledTuple = [string, string]; |
NewerOlder