-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Stateless function components in JSX #5596
Stateless function components in JSX #5596
Conversation
# Conflicts: # src/compiler/checker.ts # src/harness/harness.ts
@@ -203,12 +200,17 @@ namespace ts { | |||
} | |||
}; | |||
|
|||
let jsxElementType: ObjectType; | |||
/** Things we lazy load from the JSX namespace */ | |||
const jsxTypes: {[name: string]: ObjectType} = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map<ObjectType>
@@ -1115,6 +1117,15 @@ namespace Harness { | |||
includeBuiltFiles.push({ unitName: builtFileName, content: normalizeLineEndings(IO.readFile(builtFileName), newLine) }); | |||
} | |||
|
|||
// Files from tests\lib that are requested by "@libFiles" | |||
if (options.libFiles) { | |||
ts.forEach(options.libFiles.split(","), filename => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fileName
, also use a for
..of
if you don't need a forEach
Will this get included in TypeScript 1.7? Alternatively, any ETA? |
This is slated for TypeScript 1.8. TypeScript 1.7 should be coming out fairly soon. |
Stateless function components in JSX
In this PR:
ref
andkey
(see Design preview: Stateless Functional Components in JSX #5478 again)@libfiles
test directive so we can test the react.d.ts file (and others) with better fidelity. Use this minimally as it will be much slower than a compact testcaseJsxFlags.ClassElement
toValueElement
There will be a sister PR to this one to DefinitelyTyped to add the new types to react.d.ts