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:
parent
6f31a78b57
commit
b5276c324f
1 changed files with 2 additions and 2 deletions
|
|
@ -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()`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue