Initial check in - Support other JSX factories Issue #3788

- added jsxNamespace compile option
- when jsx mode is "react", jsxNamespace optionally specifies the emit namespace for React calls, eg "--jsxNamespace MyDOMLib" will emit calls as MyDOMLib.createElement (instead of React.createElement)
- symbol specified by jsxNamespace must be present, else compile error is generated (same handling as is done for React symbol when no jsxNamespace is specified)
This commit is contained in:
Rowan Wyborn
2015-12-18 21:56:08 +11:00
parent bb1e5ab5ea
commit b7f60704bb
5 changed files with 17 additions and 6 deletions

View File

@@ -54,6 +54,11 @@ namespace ts {
description: Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,
error: Diagnostics.Argument_for_jsx_must_be_preserve_or_react
},
{
name: "jsxNamespace",
type: "string",
description: Diagnostics.Specify_JSX_emit_namespace_when_JSX_code_generation_mode_is_react
},
{
name: "listFiles",
type: "boolean",