Skip to content

Commit

Permalink
Style(web-react): Declare missing prettier module for types
Browse files Browse the repository at this point in the history
  * installing @types/prettier or prettier itself did not help
  * second options is to use `skipLibCheck: true`
  • Loading branch information
literat authored and crishpeen committed Aug 29, 2023
1 parent 86acc0b commit 0733ec0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/web-react/src/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,15 @@ declare module '*.md?raw' {
interface Window {
console: Console;
}

/**
* Declaring `prettier` module to fix following problem
*
* ../../node_modules/@storybook/components/dist/index.d.ts:5:35
* error TS7016: Could not find a declaration file for module 'prettier'. '/spirit-design-system/node_modules/prettier/index.js' implicitly has an 'any' type.
* Try `npm i --save-dev @types/prettier` if it exists or add a new declaration (.d.ts) file containing `declare module 'prettier';`
* 5 import { BuiltInParserName } from 'prettier';
*/
declare module 'prettier' {
export type BuiltInParserName = unknown;
}

0 comments on commit 0733ec0

Please sign in to comment.