Skip to content

Commit

Permalink
Export inferno typescript types using export type syntax in inferno-c…
Browse files Browse the repository at this point in the history
…ompat package to get rid off webpack harmony link warnings
  • Loading branch information
Sampo Kivistö committed Oct 25, 2021
1 parent 841de5e commit 7702509
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
13 changes: 3 additions & 10 deletions packages/inferno-compat/src/index.ts
Expand Up @@ -9,7 +9,6 @@ import {
_MP,
_MR,
Component,
ComponentType,
createComponentVNode,
createFragment,
createPortal,
Expand All @@ -28,13 +27,14 @@ import {
normalizeProps,
options,
Props,
Refs,
rerender,
VNode
} from 'inferno';
export type { ComponentType, InfernoNode, Props, Refs, VNode } from 'inferno';
import { hydrate } from 'inferno-hydrate';
import { cloneVNode } from 'inferno-clone-vnode';
import { ClassicComponentClass, ComponentSpec, createClass } from 'inferno-create-class';
import { createClass } from 'inferno-create-class';
export type { ClassicComponentClass, ComponentSpec } from 'inferno-create-class';
import { createElement } from 'inferno-create-element';
import { isArray, isFunction, isInvalid, isNull, isNullOrUndef, isNumber, isString, warning } from 'inferno-shared';
import { VNodeFlags } from 'inferno-vnode-flags';
Expand Down Expand Up @@ -394,18 +394,11 @@ if (typeof window !== 'undefined' && typeof (window as any).React === 'undefined

export {
Children,
ClassicComponentClass,
Component,
ComponentSpec,
ComponentType,
EMPTY_OBJ,
Fragment,
InfernoNode,
Props,
PropTypes,
PureComponent,
Refs,
VNode,
// Internal methods
_CI,
_HI,
Expand Down
5 changes: 2 additions & 3 deletions packages/inferno/__tests__/animationHooks.spec.jsx
@@ -1,6 +1,5 @@
import { Component, render, VNode } from 'inferno';
import { Component, render } from 'inferno';
import { createElement } from 'inferno-create-element';
import { isNull } from 'inferno-shared';

describe('animation hooks', () => {
let container;
Expand Down Expand Up @@ -71,7 +70,7 @@ describe('animation hooks', () => {
class App extends Component {
componentWillMove(parentVNode, parent, dom, props) {
spyer('willMove');
expect(parentVNode instanceof VNode).toEqual(true);
expect(parentVNode.type).toEqual(App);
expect(parent instanceof HTMLDivElement).toEqual(true);
expect(dom instanceof HTMLDivElement).toEqual(true);
expect(next instanceof HTMLDivElement).toEqual(true);
Expand Down

0 comments on commit 7702509

Please sign in to comment.