gatsby-plugin-ts-config
gatsby-plugin-ts-config copied to clipboard
Provide an example "opts" object
I see the new 2.0 version changes how this plugin works, however, it would be great to see a basic example of what the 'opts' looks like. Is it optional? Does it have default settings?
It's great to know the fields it can take, but there is no mention of what is required.
The README lists the available options. They are all optional.
I know from experimenting with it, my issue is regarding the README no where states that opts is optional. In the examples, there is an opts variable passed but no indication that it is an optional argument, or a small snippet to show what it could look like. If anyone copies and pastes the code snippet examples, opts is always undefined.
I show the opts
parameter in the example to indicate that it is an available parameter, and what to put there. The examples aren’t generally working code anyway.
I suppose I could add a minimally viable example at the top that people could actually copy. Then have the more “advanced” usage below
Can add a note to the docs to show the entire options parameter is optional too
Perhaps an API listing would be good to have, as well. They could include the function signature for useGatsbyConfig
and useNodeConfig
Sounds great!