-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: ignore module-not-found errors in doc-check (#1701)
Sometimes we want to show examples that use modules that aren't a dependency of the module we are documenting. In this case tsc throws `TS2307` when trying to compile the example code block. Ignore this error so we can just treat these deps as `any` while still getting the benefit of compiling the rest of the code block.
- Loading branch information
1 parent
9bb06f9
commit 41726f8
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
```ts | ||
export const a = 1; | ||
import { foo } from 'dep-we-do-not-have' | ||
|
||
// should not cause an error because we ignore TS2307 | ||
foo() | ||
|
||
export const a = 1 | ||
``` |