You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ Issues can be funded by anyone and the money will be transparently distributed t
68
68
-[Recipes](#recipes)
69
69
-[Baseline tsconfig.json](#baseline-tsconfigjson)
70
70
-[Default and Named Module Exports](#default-and-named-module-exports)
71
+
-[Imports in Module Decleration](#imports-in-module-decleration)
71
72
-[Type Augmentation for npm libraries](#type-augmentation-for-npm-libraries)
72
73
-[Override type-definitions for npm libraries](#override-type-definitions-for-npm-libraries)
73
74
-[FAQ](#faq)
@@ -1599,6 +1600,16 @@ import Select from '@src/components/select';
1599
1600
1600
1601
[⇧ back to top](#table-of-contents)
1601
1602
1603
+
### Imports in Module Decleration
1604
+
> When creating 3rd party modules declarations all the imports should be put inside the module decleration, otherwise it will be treated as augmentation and show error
1605
+
```ts
1606
+
declaremodule"react-custom-scrollbars" {
1607
+
import*asReactfrom"react";
1608
+
exportinterfacepositionValues {
1609
+
...
1610
+
```
1611
+
[⇧ back to top](#table-of-contents)
1612
+
1602
1613
### Type Augmentation for npm libraries
1603
1614
Strategies to fix issues coming from external type-definitions files (*.d.ts)
Copy file name to clipboardExpand all lines: README_SOURCE.md
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,7 @@ Issues can be funded by anyone and the money will be transparently distributed t
68
68
-[Recipes](#recipes)
69
69
-[Baseline tsconfig.json](#baseline-tsconfigjson)
70
70
-[Default and Named Module Exports](#default-and-named-module-exports)
71
+
-[Imports in Module Decleration](#imports-in-module-decleration)
71
72
-[Type Augmentation for npm libraries](#type-augmentation-for-npm-libraries)
72
73
-[Override type-definitions for npm libraries](#override-type-definitions-for-npm-libraries)
73
74
-[FAQ](#faq)
@@ -623,6 +624,16 @@ import Select from '@src/components/select';
623
624
624
625
[⇧ back to top](#table-of-contents)
625
626
627
+
### Imports in Module Decleration
628
+
> When creating 3rd party modules declarations all the imports should be put inside the module decleration, otherwise it will be treated as augmentation and show error
629
+
```ts
630
+
declaremodule"react-custom-scrollbars" {
631
+
import*asReactfrom"react";
632
+
exportinterfacepositionValues {
633
+
...
634
+
```
635
+
[⇧ back to top](#table-of-contents)
636
+
626
637
### Type Augmentation for npm libraries
627
638
Strategies to fix issues coming from external type-definitions files (*.d.ts)
0 commit comments