1
0
Fork 0
mirror of https://github.com/archtechx/alpine-typescript.git synced 2025-12-11 22:34:03 +00:00

Fix file extension in example

This commit is contained in:
Samuel Štancl 2021-02-27 19:47:54 +01:00 committed by GitHub
parent 6f31a78b57
commit b5276c324f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -199,7 +199,7 @@ import 'alpinejs';
- We import Alpine *after* this package
<details>
<summary>resources/js/search.js</summary>
<summary>resources/js/search.ts</summary>
```ts
import { AlpineComponent } from '@leanadmin/alpine-typescript';
@ -316,7 +316,7 @@ export default class Search extends AlpineComponent {
</details>
**`search.js` highlights:**
**`search.ts` highlights:**
- We `export default` the class
- We have to call `super()` if we define a constructor
- Sometimes, we have to use `as HTMLElement` because the DOM API can return `Element` which doesn't have methods like `focus()`