Skip to content

Commit

Permalink
Remove notes and fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewiggins committed Jun 20, 2019
1 parent 48210ba commit b2e0df6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
18 changes: 9 additions & 9 deletions compat/src/internal.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Ref } from '../..';
import {
Component as PreactComponent,
VNode as PreactVNode,
Component as PreactComponent,
VNode as PreactVNode,
FunctionalComponent as PreactFunctionalComponent
} from '../../src/internal';
import { SuspenseProps } from './suspense';
Expand All @@ -11,25 +11,25 @@ export { ComponentChildren } from '../..';
export { PreactElement } from '../../src/internal';

export interface Component<P = {}, S = {}> extends PreactComponent<P, S> {
isReactComponent?: object;
isReactComponent?: object;
isPureReactComponent?: true;

_childDidSuspend?(error: Promise<void>);
}

export interface FunctionalComponent<P = {}> extends PreactFunctionalComponent<P> {
shouldComponentUpdate?(nextProps: Readonly<P>): boolean;
_forwarded?: true;
shouldComponentUpdate?(nextProps: Readonly<P>): boolean;
_forwarded?: true;
}

export interface VNode<T = any> extends PreactVNode<T> {
$$typeof?: symbol | string;
preactCompatNormalized?: boolean;
$$typeof?: symbol | string;
preactCompatNormalized?: boolean;
}

export interface ForwardFn<P = {}, T = any> {
(props: P, ref: Ref<T>): VNode;
displayName?: string;
(props: P, ref: Ref<T>): VNode;
displayName?: string;
}

export interface SuspenseState {
Expand Down
6 changes: 1 addition & 5 deletions compat/test/browser/suspense.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*eslint-env browser, mocha */
/* eslint-env browser, mocha */
/** @jsx h */
import { setupRerender } from 'preact/test-utils';
import { createElement as h, render, Component, Suspense, lazy, Fragment } from '../../src/index';
Expand All @@ -11,10 +11,6 @@ import { setupScratch, teardown } from '../../../test/_util/helpers';
* @returns {[typeof Component, () => Resolvers]}
*/
function createSuspender(DefaultComponent) {
// Test public api
// Prefer not relying on internal VNode shape
// Prefer not refs so refs can change and break without affecting unrelated tests
// Prefer not using forceUpdate since it doesn't match what our user's will do/experience

/** @type {(lazy: h.JSX.Element) => void} */
let renderLazy;
Expand Down

0 comments on commit b2e0df6

Please sign in to comment.