Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typed children for function-based widgets #544

Merged
merged 16 commits into from
Oct 1, 2019
Prev Previous commit
Next Next commit
remove unused import
  • Loading branch information
agubler committed Sep 29, 2019
commit 15e7d84151e9846f7a95ec5b0e5a389ab5ff7ef7
6 changes: 3 additions & 3 deletions tests/core/unit/tsxIntegration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { assert } = intern.getPlugin('chai');
import { WidgetBase } from '../../../src/core/WidgetBase';
import { Registry } from '../../../src/core/Registry';
import { WNode, RenderResult } from '../../../src/core/interfaces';
import { create, tsx, fromRegistry, w } from '../../../src/core/vdom';
import { create, tsx, fromRegistry } from '../../../src/core/vdom';

const registry = new Registry();

Expand Down Expand Up @@ -61,9 +61,9 @@ registerSuite('tsx integration', {
}
return null;
});

// types correctly
<Foo>{{ left: () => 'left', right: () => 'right'}}</Foo>;
<Foo>{{ left: () => 'left', right: () => 'right' }}</Foo>;
// uncomment to see compile errors
// <Foo>{{ left: () => 'left'}}</Foo>;
// <Foo>{{ right: () => 'right'}}</Foo>;
Expand Down