Skip to content

Commit d1a915d

Browse files
committed
Fix incorrect type of settings in presets
1 parent 98ab675 commit d1a915d

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
*
99
* @typedef {import('../index.js').CompileResultMap} CompileResultMap
1010
* @typedef {import('../index.js').Data} Data
11+
* @typedef {import('../index.js').Settings} Settings
1112
*/
1213

1314
/**
@@ -175,7 +176,7 @@
175176
* They can contain plugins and settings.
176177
* @property {PluggableList | undefined} [plugins]
177178
* List of plugins and presets (optional).
178-
* @property {Data | undefined} [settings]
179+
* @property {Settings | undefined} [settings]
179180
* Shared settings for parsers and compilers (optional).
180181
*/
181182

test/types.d.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
declare module 'unified' {
22
interface Data {
3+
baz?: 'qux' | undefined
4+
foo?: 'bar' | undefined
5+
x?: boolean | undefined
6+
}
7+
8+
interface Settings {
39
alpha?: boolean | undefined
410
bar?: boolean | undefined
5-
baz?: 'qux' | undefined
6-
foo?: 'bar' | boolean | undefined
11+
foo?: boolean | undefined
712
qux?: boolean | undefined
8-
x?: boolean | undefined
913
}
1014
}
1115

0 commit comments

Comments
 (0)