// src/controllers/chat.ts
export default class ChatController {
private static instance: ChatController;
private constructor() {}
static getInstance(): ChatController {
if (!ChatController.instance) {
ChatController.instance = new ChatController();
}
return ChatController.instance;
}
}
// src/controllers/chat.ts
export default class ChatController {
private static instance: ChatController;
private constructor() {}
static getInstance(): ChatController {
if (!ChatController.instance) {
ChatController.instance = new ChatController();
}
return ChatController.instance;
}
}
See Google
Let's create a file called chat.ts
in the src/controllers
directory and let's get to work.
<script lang="ts">import * as Accordion from "$lib/components/ui/accordion";
</script>
<Accordion.Root>
<Accordion.Item value="item-1">
<Accordion.Trigger>Is it accessible?</Accordion.Trigger>
<Accordion.Content>Yes. It adheres to the WAI-ARIA design pattern.</Accordion.Content>
</Accordion.Item>
</Accordion.Root>
<script lang="ts">import * as Accordion from "$lib/components/ui/accordion";
</script>
<Accordion.Root>
<Accordion.Item value="item-1">
<Accordion.Trigger>Is it accessible?</Accordion.Trigger>
<Accordion.Content>Yes. It adheres to the WAI-ARIA design pattern.</Accordion.Content>
</Accordion.Item>
</Accordion.Root>
npm run dev
npm run dev