From 19e75e76ceaa89111d6ba93ed93edca5f35d9924 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Sun, 28 Feb 2021 16:35:10 +0100 Subject: [PATCH] fix typo --- README.md | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 92e873c..23d90fe 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ import { component } from '@leanadmin/alpine-typescript'; component('example', ExampleComponent); ``` -Which will make it accessible using `Alpine.component('example')('foo', 'bar)`. +Which will make it accessible using `Alpine.component('example')('foo', 'bar')`. **Note: You may notice that `Alpine.component()` can also be used to register components. However, it's better to avoid using it.** The reason for this is that `window.Alpine` might not yet be accessible when you're registering components, and if it is, it's possible that it's already evaluated some of the `x-data` attributes. `component()` is guaranteed to work. And of course, you can alias the import if you wish to use a different name. diff --git a/src/index.ts b/src/index.ts index 00fea54..a77cfa0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ declare const window: any; type ComponentConstructor = (...args: any[]) => object; -export class AlpineComponent { +export abstract class AlpineComponent { /** Retrieve the root component DOM node. */ $el?: HTMLElement;