227
227
###### ` handlers `
228
228
229
229
Object mapping node types to functions handling the corresponding nodes
230
- (` Record<string, Handle> ` ).
230
+ (` Record<string, Handle> ` , optional ).
231
231
232
232
Merged into the defaults.
233
233
See [ ` Handle ` ] [ handle ] .
@@ -250,22 +250,22 @@ Info passed around about the current state (TypeScript type).
250
250
251
251
* ` schema ` ([ ` Schema ` ][schema])
252
252
— current schema
253
- * ` comments ` ( ` Array <Comment >` )
253
+ * ` comments ` ( ` Array <EstreeComment >` )
254
254
— list of estree comments
255
- * ` esm ` ( ` Array <Node >` )
255
+ * ` esm ` ( ` Array <EstreeNode >` )
256
256
— list of top-level estree nodes
257
- * ` handle ` ( ` (node : Node ) => JsxChild | void ` )
257
+ * ` handle ` ( ` (node : HastNode ) => EstreeJsxChild | void ` )
258
258
— transform a hast node to estree
259
- * ` handle ` ( ` (node : Parent ) => JsxChild | void ` )
259
+ * ` handle ` ( ` (node : HastParent ) => EstreeJsxChild | void ` )
260
260
— transform children of a hast parent to estree
261
261
* ` patch ` ( ` (from : HastNode , to : EstreeNode ) => void ` )
262
262
— take positional info from ` from ` (use ` inherit ` if you also want data)
263
263
* ` inherit ` ( ` (from : HastNode , to : EstreeNode ) => void ` )
264
264
— take positional info and data from ` from ` (use ` patch ` if you don’t want
265
265
data)
266
- * ` createJsxAttributeName ` ( ` (name : string ) => JsxAttributeName ` )
266
+ * ` createJsxAttributeName ` ( ` (name : string ) => EstreeJsxAttributeName ` )
267
267
— create a JSX attribute name
268
- * ` createJsxElementName ` ( ` (name : string ) => JsxElementName ` )
268
+ * ` createJsxElementName ` ( ` (name : string ) => EstreeJsxElementName ` )
269
269
— create a JSX attribute name
270
270
271
271
## Types
0 commit comments