Last active
October 27, 2020 16:17
-
-
Save kettanaito/9e8db68ffc785571bdc22a5513fdaf64 to your computer and use it in GitHub Desktop.
Common TypeScript declarations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '*.gql' { | |
import { DocumentNode } from 'graphql' | |
const vaule: DocumentNode | |
export default value | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare module '*.svg' { | |
interface SvgrComponent | |
extends React.StatelessComponent<React.SVGAttributes<SVGElement>> {} | |
const ReactComponent: SvgrComponent | |
// You may want to use named export here, outside of NextJS: | |
// const Component: ReactComponent | |
// export = Component | |
export default ReactComponent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment