Allow type declarations from extend layers
See original GitHub issueAdding type augmentations from the main layer is possible using top-level index.d.ts
(and what we recommend in docs. We could also support it for all layers for augmenting NuxtApp
(plugin injections) and AppConfigInput
(app.config
from themes).
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Extending object-like types with interfaces in TypeScript
Let's look at how to take advantage of declaration merging, as well as some cases of when you might want to. Expanding interfaces...
Read more >TSConfig Reference - Docs on every TSConfig option
Without this flag, TypeScript will allow you to use the dot syntax to ... rootDirs can be used to provide a separate “type...
Read more >Extending existing @types type definition to include missing ...
You can declare an augmentation for the module: // leaflet.aug.d.ts import 'leaflet'; declare module 'leaflet' { export interface ...
Read more >TypeScript: Enhance Variable Types with Declaration Merging
Typically, when we use external libraries that come with their own type declarations it sometimes is necessary to extend a type with some...
Read more >How To Use Generics in TypeScript - DigitalOcean
This generic type accepts a single type parameter, T . Inside the type declaration itself, you are checking if the type T extends...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Would you please help on supporting index.d.ts from layers? 🙏🏼
I think it’s a nice idea (and possibly worth implementing), but I think there are some solutions to consider first:
For app config, the following might do it (though I haven’t yet tested):