Skip to content

Commit 409ad69

Browse files
committed
Replace complex-types.d.ts with index.d.ts
1 parent 8e7f703 commit 409ad69

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ coverage/
22
node_modules/
33
.DS_Store
44
*.log
5-
index.d.ts
5+
lib/**/*.d.ts
66
test.d.ts
77
yarn.lock

complex-types.d.ts renamed to index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
import type {Literal} from 'hast'
22

3+
export type {Options} from './lib/index.js'
4+
export {raw} from './lib/index.js'
5+
36
/* eslint-disable @typescript-eslint/consistent-type-definitions */
47

58
export interface Raw extends Literal {
69
type: 'raw'
710
}
811

12+
// Add `Raw` nodes to roots and elements.
913
declare module 'hast' {
1014
interface RootContentMap {
1115
raw: Raw

index.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
/**
2-
* @typedef {import('./lib/index.js').Options} Options
3-
* @typedef {import('./complex-types.js').Raw} Raw
4-
*/
5-
1+
// Note: see `index.d.ts` for exposed types.
62
export {raw} from './lib/index.js'

lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* @typedef {import('hast').Comment} Comment
1919
* @typedef {import('hast').Content} Content
2020
*
21-
* @typedef {import('../complex-types.js').Raw} Raw
21+
* @typedef {import('../index.js').Raw} Raw
2222
*/
2323

2424
/**

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"types": "index.d.ts",
3131
"files": [
3232
"lib/",
33-
"complex-types.d.ts",
3433
"index.d.ts",
3534
"index.js"
3635
],

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["**/**.js", "complex-types.d.ts", "test-types.d.ts"],
2+
"include": ["**/**.js", "index.d.ts"],
33
"exclude": ["coverage/", "node_modules/"],
44
"compilerOptions": {
55
"checkJs": true,

0 commit comments

Comments
 (0)