Skip to content

Commit

Permalink
Fix incorrect type of settings in presets
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Aug 17, 2023
1 parent 98ab675 commit d1a915d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* @typedef {import('../index.js').CompileResultMap} CompileResultMap
* @typedef {import('../index.js').Data} Data
* @typedef {import('../index.js').Settings} Settings
*/

/**
Expand Down Expand Up @@ -175,7 +176,7 @@
* They can contain plugins and settings.
* @property {PluggableList | undefined} [plugins]
* List of plugins and presets (optional).
* @property {Data | undefined} [settings]
* @property {Settings | undefined} [settings]
* Shared settings for parsers and compilers (optional).
*/

Expand Down
10 changes: 7 additions & 3 deletions test/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
declare module 'unified' {
interface Data {
baz?: 'qux' | undefined
foo?: 'bar' | undefined
x?: boolean | undefined
}

interface Settings {
alpha?: boolean | undefined
bar?: boolean | undefined
baz?: 'qux' | undefined
foo?: 'bar' | boolean | undefined
foo?: boolean | undefined
qux?: boolean | undefined
x?: boolean | undefined
}
}

Expand Down

0 comments on commit d1a915d

Please sign in to comment.