Skip to content

Commit f962b07

Browse files
committed
Refactor code-style
1 parent 79beb15 commit f962b07

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

index.d.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type {Nodes} from 'hast'
21
import type {VFile} from 'vfile'
32

43
export {raw} from './lib/index.js'

lib/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* @import {Comment, Doctype, Element, Nodes, RootContent, Root, Text} from 'hast'
32
* @import {Options} from 'hast-util-raw'
3+
* @import {Comment, Doctype, Element, Nodes, RootContent, Root, Text} from 'hast'
44
* @import {Raw} from 'mdast-util-to-hast'
55
* @import {DefaultTreeAdapterMap, ParserOptions} from 'parse5'
66
* @import {Point} from 'unist'

test-types.d.ts

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
1-
import type {Parent, Literal} from 'hast'
1+
import type {Literal, Parent} from 'hast'
22

3-
export interface CustomParent extends Parent {
4-
type: 'customParent'
3+
interface CustomLiteral extends Literal {
4+
type: 'customLiteral'
55
}
66

7-
export interface CustomLiteral extends Literal {
8-
type: 'customLiteral'
7+
interface CustomParent extends Parent {
8+
type: 'customParent'
99
}
1010

11-
export interface MdxjsEsm extends Literal {
11+
interface MdxjsEsm extends Literal {
1212
type: 'mdxjsEsm'
1313
}
1414

15+
// Register nodes.
1516
declare module 'hast' {
16-
interface RootContentMap {
17+
interface ElementContentMap {
1718
customLiteral: CustomLiteral
1819
customParent: CustomParent
19-
mdxjsEsm: MdxjsEsm
2020
}
2121

22-
interface ElementContentMap {
22+
interface RootContentMap {
2323
customLiteral: CustomLiteral
2424
customParent: CustomParent
25+
mdxjsEsm: MdxjsEsm
2526
}
2627
}

0 commit comments

Comments
 (0)