Skip to content

Commit a6a25ad

Browse files
peterblazejewiczpiotrwitek
authored andcommitted
Add example of a shorthand module declaration. Closes piotrwitek#17
This one comes from TS handbook - the link comes with added text. Thanks!
1 parent 3679911 commit a6a25ad

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,12 @@ import Select from '@src/components/select';
11061106
### Fixing Vendor Type Issues
11071107
> Strategies to fix various issues coming from broken vendor type declaration files (*.d.ts)
11081108
1109+
- The quote from the docs: _"If you don’t want to take the time to write out declarations before using a new module, you can use a shorthand declaration to get started quickly. [...] All imports from a shorthand module will have the any type."_ - [Shorthand Ambient Modules](https://git.io/v5hMA)
1110+
1111+
```ts
1112+
declare module "webpack-merge";
1113+
```
1114+
11091115
- Augumenting library internal type declarations - using relative import resolution
11101116
```ts
11111117
// added missing autoFocus Prop on Input component in "[email protected]" npm package

0 commit comments

Comments
 (0)