Skip to content

Commit

Permalink
Fix TS compilation error due to needless file-entry-cache import (#…
Browse files Browse the repository at this point in the history
…6393)

This type import was added in #6356, but during code review that PR was refactored to obviate the `file-entry-cache` types in the public API. The import was never removed. Keeping the import here results in [compilation errors](https://app.circleci.com/pipelines/github/palantir/blueprint/3156/workflows/9eda97ec-3a2f-4aa6-aa6c-89d5b65b8491/jobs/61694) for downstream consumers:

```
../../node_modules/stylelint/types/stylelint/index.d.ts:5:39 - error TS7016: Could not find a declaration file for module 'file-entry-cache'. '/home/circleci/project/node_modules/file-entry-cache/cache.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/file-entry-cache` if it exists or add a new declaration (.d.ts) file containing `declare module 'file-entry-cache';`

5  import type * as fileEntryCache from 'file-entry-cache'
```
  • Loading branch information
adidahiya committed Oct 5, 2022
1 parent cf04b2b commit 59d6a3f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fix-unused-type-import.md
@@ -0,0 +1,5 @@
---
"stylelint": patch
---

Fixed: TS compilation error due to needless `file-entry-cache` import
1 change: 0 additions & 1 deletion types/stylelint/index.d.ts
Expand Up @@ -2,7 +2,6 @@ declare module 'stylelint' {
import type * as PostCSS from 'postcss';
import type { GlobbyOptions } from 'globby';
import type { cosmiconfig } from 'cosmiconfig';
import type * as fileEntryCache from 'file-entry-cache';

namespace stylelint {
export type Severity = 'warning' | 'error';
Expand Down

0 comments on commit 59d6a3f

Please sign in to comment.