Skip to content

Commit

Permalink
fix: make typings deno compatible (#3079)
Browse files Browse the repository at this point in the history
This commit changes the types to use ESM d.ts files intead of UMD/global
files. Added an additional test to validate that the global `preact`
Typescript namespace is still present.

Co-authored-by: Jovi De Croock <decroockjovi@gmail.com>
  • Loading branch information
lucacasonato and JoviDeCroock authored May 20, 2021
1 parent 4f5891e commit ef5e614
Show file tree
Hide file tree
Showing 5 changed files with 374 additions and 366 deletions.
4 changes: 2 additions & 2 deletions compat/src/suspense-list.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component, ComponentChild } from '../../src';
import { Component, ComponentChild, ComponentChildren } from '../../src';

//
// SuspenseList
// -----------------------------------

export interface SuspenseListProps {
children?: preact.ComponentChildren;
children?: ComponentChildren;
revealOrder?: 'forwards' | 'backwards' | 'together';
}

Expand Down
6 changes: 3 additions & 3 deletions compat/src/suspense.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Component, ComponentChild } from '../../src';
import { Component, ComponentChild, ComponentChildren } from '../../src';

//
// Suspense/lazy
// -----------------------------------
export function lazy<T>(loader: () => Promise<{ default: T } | T>): T;

export interface SuspenseProps {
children?: preact.ComponentChildren;
fallback: preact.ComponentChildren;
children?: ComponentChildren;
fallback: ComponentChildren;
}

export class Suspense extends Component<SuspenseProps> {
Expand Down
Loading

0 comments on commit ef5e614

Please sign in to comment.