forked from nicojs/typed-html
-
-
Notifications
You must be signed in to change notification settings - Fork 28
/
alpine.d.ts
134 lines (116 loc) · 3.24 KB
/
alpine.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
// This file is a result from https://alpinejs.dev/
// Missing something? Please submit a issue report or a PR:
// https://github.com/kitajs/html
declare namespace JSX {
interface HtmlTag extends Alpine.Attributes {}
}
declare namespace Alpine {
/** Definitions for Alpine.js attributes. */
interface Attributes {
/**
* Adds behavior to an element to make it interactive.
*
* @see https://alpinejs.dev/directives/data
*/
'x-data'?: string;
/**
* Initializes Alpine.js and defines the scope for reactive properties and methods
* within an element or its children.
*
* @see https://alpinejs.dev/directives/init
*/
'x-init'?: string;
/**
* Conditionally shows or hides an element based on a boolean expression.
*
* @see https://alpinejs.dev/directives/show
*/
'x-show'?: string;
/**
* Conditionally renders elements based on the truthiness of a given expression.
*
* @see https://alpinejs.dev/directives/if
*/
'x-if'?: string;
/**
* Loops through an array or an object and generates HTML for each item.
*
* @see https://alpinejs.dev/directives/for
*/
'x-for'?: string;
/**
* Binds an attribute or property to a JavaScript expression.
*
* @see https://alpinejs.dev/directives/bind
*/
'x-bind'?: string;
/**
* Two-way data binding for form elements.
*
* @see https://alpinejs.dev/directives/model
*/
'x-model'?: string;
/**
* Attaches event listeners to elements.
*
* @see https://alpinejs.dev/directives/on
*/
'x-on'?: string;
/**
* Creates a reference to an element, allowing you to access it in JavaScript code.
*
* @see https://alpinejs.dev/directives/ref
*/
'x-ref'?: string;
/**
* Updates the text content of an element based on a JavaScript expression.
*
* @see https://alpinejs.dev/directives/text
*/
'x-text'?: string;
/**
* Updates the inner HTML of an element based on a JavaScript expression.
*
* @see https://alpinejs.dev/directives/html
*/
'x-html'?: string;
/**
* Adds transition effects to elements when they are inserted, updated, or removed
* from the DOM.
*
* @see https://alpinejs.dev/directives/transition
*/
'x-transition'?: string;
/**
* Adds a side-effect to an element, such as executing a function or modifying data.
*
* @see https://alpinejs.dev/directives/effect
*/
'x-effect'?: string;
/**
* Instructs Alpine.js to ignore an element and its children during initialization.
*
* @see https://alpinejs.dev/directives/ignore
*/
'x-ignore'?: string;
/**
* Hides an element until Alpine.js is initialized to prevent the unstyled content
* from being displayed.
*
* @see https://alpinejs.dev/directives/cloak
*/
'x-cloak'?: string;
/**
* Teleports an element to a different location in the DOM.
*
* @see https://alpinejs.dev/directives/teleport
*/
'x-teleport'?: string;
/**
* Sets a unique identifier for an element.
*
* @see https://alpinejs.dev/directives/id
*/
'x-id'?: string;
}
}