extendOptions and typescript definition #470
-
I want to add a key to my definitions, so I used SimpleSchema.extendOptions to define the key. In my case, I want to add a key that simply holds a string that defines what the purpose of the schema entry refers to. For example:
That worked just fine, but it now gives me a typescript error in the editor because Typescript does not know about the custom option 'dict' I added. Any recommendations for this? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In the test we use a |
Beta Was this translation helpful? Give feedback.
In the test we use a
// @ts-expect-error
comment above each extended option to silent TS. Potentially we could add a generic type argument so that you could do something likenew SimpleSchema<ExtendedOptions>({ ... })