File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,9 @@ export type {
2222
2323export { unified } from './lib/index.js'
2424
25+ // See: <https://github.com/sindresorhus/type-fest/blob/main/source/empty-object.d.ts>
26+ declare const emptyObjectSymbol : unique symbol
27+
2528/**
2629 * Interface of known results from compilers.
2730 *
@@ -98,5 +101,6 @@ export interface Data {
98101 * export {} // You may not need this, but it makes sure the file is a module.
99102 * ```
100103 */
101- // eslint-disable-next-line @typescript-eslint/no-empty-interface
102- export interface Settings { }
104+ export interface Settings {
105+ [ emptyObjectSymbol ] ?: never
106+ }
Original file line number Diff line number Diff line change @@ -464,10 +464,6 @@ declare module './index.js' {
464464 interface CompileResultMap {
465465 ReactNode : ReactNode
466466 }
467-
468- interface Data {
469- something ?: string | undefined
470- }
471467}
472468
473469// Compile plugin (to a non-node).
@@ -552,6 +548,15 @@ expectType<Processor>(
552548 } )
553549)
554550
551+ /**
552+ * Register our setting.
553+ */
554+ declare module './index.js' {
555+ interface Settings {
556+ something ?: string | undefined
557+ }
558+ }
559+
555560expectType < Processor > (
556561 unified ( ) . use ( {
557562 plugins : [
You can’t perform that action at this time.
0 commit comments