TypeScript/tests/cases/conformance/jsx/tsxSfcReturnUndefinedStrictNullChecks.tsx
Kanchalai Tanglertsampan fc6eee1a6c Add tests and baselines
2017-02-17 13:13:26 -08:00

17 lines
No EOL
333 B
TypeScript

// @filename: file.tsx
// @jsx: preserve
// @module: amd
// @noLib: true
// @strictNullChecks: true
// @libFiles: react.d.ts,lib.d.ts
import React = require('react');
const Foo = (props: any) => undefined;
function Greet(x: {name?: string}) {
return undefined;
}
// Error
const foo = <Foo />;
const G = <Greet />;