Skip to content
This repository was archived by the owner on Jul 30, 2020. It is now read-only.

Commit c72f45f

Browse files
aihambcarroll22
authored andcommitted
fix(types): correct a local/import type declaration conflict (#79)
* Fix local/import type declaration conflict Fixes an error introduced by a backwards incompatible change in TypeScript 3.7 which fails if you declare a local type with the same name as an imported type: https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/#local-and-imported-type-declarations-now-conflict * Fix typings: only include getProp/parentNode in NativeTestInstance
1 parent 2097cc7 commit c72f45f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typings/query-helpers.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ export type SelectorMatcherOptions = Omit<MatcherOptions, 'selector'> & {
88
selector?: string;
99
};
1010

11-
type ReactTestInstance = {
11+
type ReactTestInstanceExtended = ReactTestInstance & {
1212
getProp: (name: string) => NativeTestInstance;
1313
parentNode: NativeTestInstance;
1414
};
1515

1616
export type NativeTestInstance = Omit<
17-
ReactTestInstance,
17+
ReactTestInstanceExtended,
1818
'findAllByProps' | 'findAllByType' | 'findByProps' | 'findByType' | 'instance'
1919
>;
2020

0 commit comments

Comments
 (0)