TypeScript/tests/cases/fourslash/codeFixInferFromUsageJSXElement.ts
Nathan Shively-Sanders 052a3d9d73 Infer void from expr statement usage, not calls
This makes inferences a lot better.
2019-09-05 16:16:35 -07:00

34 lines
869 B
TypeScript

/// <reference path='fourslash.ts' />
// @noImplicitAny: true
// @jsx: react
// @module: es2015
// @moduleResolution: node
////declare namespace React {
//// export class Component { render(): JSX.Element | null; }
////}
////declare global {
//// namespace JSX {
//// interface Element {}
//// }
////}
////
//// export default function Component([|props |]) {
//// if (props.isLoading) {
//// return <div>...Loading < /div>;
//// }
//// else {
//// return <AnotherComponent
//// update={
//// (rec) => {
//// return props.update(rec);
//// }
//// }
//// />;
//// }
//// }
verify.rangeAfterCodeFix("props: { isLoading: any; update: (arg0: any) => any; }",/*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0);