Skip to content

Commit 677b847

Browse files
committed
Consistently use import type
1 parent 752308c commit 677b847

12 files changed

+21
-15
lines changed

src/MountRenderer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import type {
33
MountRendererProps,
44
RSTNode,
55
} from 'enzyme';
6-
import { VNode, h, createElement } from 'preact';
6+
import type { VNode } from 'preact';
7+
import { h, createElement } from 'preact';
78
import { act } from 'preact/test-utils';
89

910
import { render } from './compat.js';

src/ShallowRenderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {
1+
import type {
22
ShallowRenderer as AbstractShallowRenderer,
33
RSTNode,
44
ShallowRenderOptions,
55
} from 'enzyme';
6-
import { VNode } from 'preact';
6+
import type { VNode } from 'preact';
77

88
import MountRenderer from './MountRenderer.js';
99
import {

src/compat.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
* Preact.
44
*/
55

6-
import { Component, Fragment, VNode } from 'preact';
6+
import type { Component, VNode } from 'preact';
7+
import { Fragment } from 'preact';
78

89
import {
910
getDOMNode,

src/preact10-internals.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, VNode } from 'preact';
1+
import type { Component, VNode } from 'preact';
22

33
/**
44
* This module provides access to internal properties of Preact 10 VNodes,

src/preact10-rst.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
*/
99

1010
import type { NodeType, RSTNode } from 'enzyme';
11-
import { Component, Fragment, VNode } from 'preact';
11+
import type { Component, VNode } from 'preact';
12+
import { Fragment } from 'preact';
1213

1314
import { childElements } from './compat.js';
1415
import {

src/shallow-render-utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { ComponentFactory, Component, Fragment, VNode, options } from 'preact';
1+
import type { ComponentFactory, Component, VNode } from 'preact';
2+
import { Fragment, options } from 'preact';
23

34
import { childElements } from './compat.js';
45

src/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { RSTNode } from 'enzyme';
2-
import { VNode } from 'preact';
2+
import type { VNode } from 'preact';
33

44
export function getType(obj: Object) {
55
if (obj == null) {

test/Adapter_test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { VNode } from 'preact';
1+
import type { VNode } from 'preact';
22
import * as preact from 'preact';
33
import { assert } from 'chai';
4-
import { RSTNode } from 'enzyme';
4+
import type { RSTNode } from 'enzyme';
55

66
import Adapter from '../src/Adapter.js';
77
import MountRenderer from '../src/MountRenderer.js';

test/MountRenderer_test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assert } from 'chai';
2-
import { RSTNode } from 'enzyme';
2+
import type { RSTNode } from 'enzyme';
33
import { Component } from 'preact';
44
import * as preact from 'preact';
55
import { useEffect, useLayoutEffect, useState } from 'preact/hooks';

test/preact-rst-test.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { assert } from 'chai';
2-
import { Component, Fragment, VNode } from 'preact';
2+
import type { VNode } from 'preact';
3+
import { Component, Fragment } from 'preact';
34
import * as preact from 'preact';
4-
import { NodeType, RSTNode } from 'enzyme';
5+
import type { NodeType, RSTNode } from 'enzyme';
56

67
import { getNode, rstNodeFromElement } from '../src/preact10-rst.js';
78
import { getType } from '../src/util.js';

0 commit comments

Comments
 (0)