Skip to content

Commit

Permalink
fix(testing): typcheck code matchers (#775)
Browse files Browse the repository at this point in the history
* make imports type only

* make ts pick up global augmentation of Chai.Assertion
  • Loading branch information
0xRezaa authored Feb 12, 2024
1 parent bb370b6 commit 5f17d91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/testing/src/chai-retry-plugin/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PromiseLikeAssertion } from '../types';
import type { PromiseLikeAssertion } from '../types';

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
Expand Down
2 changes: 2 additions & 0 deletions packages/testing/src/code-matchers/code-matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { Options } from 'prettier';
import * as esTreePlugin from 'prettier/plugins/estree';
import * as parserTypeScript from 'prettier/plugins/typescript';
import { format } from 'prettier/standalone';
// makes ts pick up global augmentation of Chai.Assertion
import type * as _ from './types';

use(chaiAsPromised);

Expand Down
4 changes: 2 additions & 2 deletions packages/testing/src/code-matchers/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Options } from 'prettier';
import { PromiseLikeAssertion } from '../types';
import type { Options } from 'prettier';
import type { PromiseLikeAssertion } from '../types';

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
Expand Down

0 comments on commit 5f17d91

Please sign in to comment.