From ea0580f795f027cb77a0bb8b45db95ed5191738a Mon Sep 17 00:00:00 2001 From: esdmr Date: Fri, 26 Aug 2022 11:02:14 +0430 Subject: [PATCH] Support module modes `node16` and `nodenext` in TypeScript (#103) --- scripts/generate-preact.js | 2 +- scripts/generate-react.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/generate-preact.js b/scripts/generate-preact.js index d81e369..dd8f089 100644 --- a/scripts/generate-preact.js +++ b/scripts/generate-preact.js @@ -16,7 +16,7 @@ export default ${component.name}; `, component => `import { MdiReactIconComponentType } from './dist/typings'; declare const ${component.name}: MdiReactIconComponentType; -export default ${component.name}; +export = ${component.name}; `, () => `import { FunctionalComponent } from 'preact'; // TODO(pcorpet): Extends SVGProps when it exists in Preact. diff --git a/scripts/generate-react.js b/scripts/generate-react.js index 16ef536..1360027 100644 --- a/scripts/generate-react.js +++ b/scripts/generate-react.js @@ -16,7 +16,7 @@ export default React.memo ? React.memo(${component.name}) : ${component.name}; `, component => `import { MdiReactIconComponentType } from './dist/typings'; declare const ${component.name}: MdiReactIconComponentType; -export default ${component.name}; +export = ${component.name}; `, () => `import { ComponentType, SVGProps } from 'react'; type AllSVGProps = SVGProps