|
|
@ -1,11 +1,17 @@
|
|
|
|
<script context="module" lang="ts">
|
|
|
|
<script context="module" lang="ts">
|
|
|
|
interface Hello { message: 'hello' }
|
|
|
|
interface Hello {
|
|
|
|
|
|
|
|
message: 'hello';
|
|
|
|
|
|
|
|
}
|
|
|
|
type Goodbye = { message: 'goodbye' };
|
|
|
|
type Goodbye = { message: 'goodbye' };
|
|
|
|
|
|
|
|
|
|
|
|
function this_fn(this: any) {
|
|
|
|
function this_fn(this: any) {
|
|
|
|
console.log(this);
|
|
|
|
console.log(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class Foo {
|
|
|
|
|
|
|
|
constructor(public readonly name: string) {}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export type { Hello };
|
|
|
|
export type { Hello };
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
@ -19,9 +25,9 @@
|
|
|
|
} satisfies Goodbye;
|
|
|
|
} satisfies Goodbye;
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<button
|
|
|
|
<button on:click={(e: MouseEvent) => {
|
|
|
|
on:click={(e: MouseEvent) => {
|
|
|
|
|
|
|
|
const next: number = count + 1;
|
|
|
|
const next: number = count + 1;
|
|
|
|
count = next! as number;
|
|
|
|
count = next! as number;
|
|
|
|
}}
|
|
|
|
}}
|
|
|
|
>clicks: {count}</button>
|
|
|
|
>clicks: {count}</button
|
|
|
|
|
|
|
|
>
|
|
|
|