mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Revert "feat(7411): JSX namespaced attribute syntax not supported (#47356)"
This reverts commit 0c5be02dcc.
This commit is contained in:
committed by
GitHub
parent
bdcf8abb0c
commit
fc1beb0b30
+27
-16
@@ -275,7 +275,6 @@ import {
|
||||
getEntityNameFromTypeNode,
|
||||
getErrorSpanForNode,
|
||||
getEscapedTextOfIdentifierOrLiteral,
|
||||
getEscapedTextOfJsxAttributeName,
|
||||
getESModuleInterop,
|
||||
getExpandoInitializer,
|
||||
getExportAssignmentExpression,
|
||||
@@ -351,7 +350,6 @@ import {
|
||||
getSymbolNameForPrivateIdentifier,
|
||||
getTextOfIdentifierOrLiteral,
|
||||
getTextOfJSDocComment,
|
||||
getTextOfJsxAttributeName,
|
||||
getTextOfNode,
|
||||
getTextOfPropertyName,
|
||||
getThisContainer,
|
||||
@@ -595,7 +593,6 @@ import {
|
||||
isJsxAttributeLike,
|
||||
isJsxAttributes,
|
||||
isJsxElement,
|
||||
isJsxNamespacedName,
|
||||
isJsxOpeningElement,
|
||||
isJsxOpeningFragment,
|
||||
isJsxOpeningLikeElement,
|
||||
@@ -810,6 +807,7 @@ import {
|
||||
MappedTypeNode,
|
||||
MatchingKeys,
|
||||
maybeBind,
|
||||
MemberName,
|
||||
MemberOverrideStatus,
|
||||
memoize,
|
||||
MetaProperty,
|
||||
@@ -13519,7 +13517,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
function isTypeInvalidDueToUnionDiscriminant(contextualType: Type, obj: ObjectLiteralExpression | JsxAttributes): boolean {
|
||||
const list = obj.properties as NodeArray<ObjectLiteralElementLike | JsxAttributeLike>;
|
||||
return list.some(property => {
|
||||
const nameType = property.name && (isJsxNamespacedName(property.name) ? getStringLiteralType(getTextOfJsxAttributeName(property.name)) : getLiteralTypeFromPropertyName(property.name));
|
||||
const nameType = property.name && getLiteralTypeFromPropertyName(property.name);
|
||||
const name = nameType && isTypeUsableAsPropertyName(nameType) ? getPropertyNameFromType(nameType) : undefined;
|
||||
const expected = name === undefined ? undefined : getTypeOfPropertyOfType(contextualType, name);
|
||||
return !!expected && isLiteralType(expected) && !isTypeAssignableTo(getTypeOfNode(property), expected);
|
||||
@@ -19592,8 +19590,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
function *generateJsxAttributes(node: JsxAttributes): ElaborationIterator {
|
||||
if (!length(node.properties)) return;
|
||||
for (const prop of node.properties) {
|
||||
if (isJsxSpreadAttribute(prop) || isHyphenatedJsxName(getTextOfJsxAttributeName(prop.name))) continue;
|
||||
yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: getStringLiteralType(getTextOfJsxAttributeName(prop.name)) };
|
||||
if (isJsxSpreadAttribute(prop) || isHyphenatedJsxName(idText(prop.name))) continue;
|
||||
yield { errorNode: prop.name, innerExpression: prop.initializer, nameType: getStringLiteralType(idText(prop.name)) };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29268,7 +29266,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
if (!attributesType || isTypeAny(attributesType)) {
|
||||
return undefined;
|
||||
}
|
||||
return getTypeOfPropertyOfContextualType(attributesType, getEscapedTextOfJsxAttributeName(attribute.name));
|
||||
return getTypeOfPropertyOfContextualType(attributesType, attribute.name.escapedText);
|
||||
}
|
||||
else {
|
||||
return getContextualType(attribute.parent, contextFlags);
|
||||
@@ -30402,12 +30400,12 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
attributeSymbol.links.target = member;
|
||||
attributesTable.set(attributeSymbol.escapedName, attributeSymbol);
|
||||
allAttributesTable?.set(attributeSymbol.escapedName, attributeSymbol);
|
||||
if (getEscapedTextOfJsxAttributeName(attributeDecl.name) === jsxChildrenPropertyName) {
|
||||
if (attributeDecl.name.escapedText === jsxChildrenPropertyName) {
|
||||
explicitlySpecifyChildrenAttribute = true;
|
||||
}
|
||||
if (contextualType) {
|
||||
const prop = getPropertyOfType(contextualType, member.escapedName);
|
||||
if (prop && prop.declarations && isDeprecatedSymbol(prop) && isIdentifier(attributeDecl.name)) {
|
||||
if (prop && prop.declarations && isDeprecatedSymbol(prop)) {
|
||||
addDeprecatedSuggestion(attributeDecl.name, prop.declarations, attributeDecl.name.escapedText as string);
|
||||
}
|
||||
}
|
||||
@@ -47854,9 +47852,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
const { name, initializer } = attr;
|
||||
const escapedText = getEscapedTextOfJsxAttributeName(name);
|
||||
if (!seen.get(escapedText)) {
|
||||
seen.set(escapedText, true);
|
||||
if (!seen.get(name.escapedText)) {
|
||||
seen.set(name.escapedText, true);
|
||||
}
|
||||
else {
|
||||
return grammarErrorOnNode(name, Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);
|
||||
@@ -47869,11 +47866,25 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
|
||||
}
|
||||
|
||||
function checkGrammarJsxName(node: JsxTagNameExpression) {
|
||||
if (isPropertyAccessExpression(node) && isJsxNamespacedName(node.expression)) {
|
||||
return grammarErrorOnNode(node.expression, Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names);
|
||||
if (isPropertyAccessExpression(node)) {
|
||||
let propName: JsxTagNameExpression = node;
|
||||
do {
|
||||
const check = checkGrammarJsxNestedIdentifier(propName.name);
|
||||
if (check) {
|
||||
return check;
|
||||
}
|
||||
propName = propName.expression;
|
||||
} while (isPropertyAccessExpression(propName));
|
||||
const check = checkGrammarJsxNestedIdentifier(propName);
|
||||
if (check) {
|
||||
return check;
|
||||
}
|
||||
}
|
||||
if (isJsxNamespacedName(node) && getJSXTransformEnabled(compilerOptions) && !isIntrinsicJsxName(node.namespace.escapedText)) {
|
||||
return grammarErrorOnNode(node, Diagnostics.React_components_cannot_include_JSX_namespace_names);
|
||||
|
||||
function checkGrammarJsxNestedIdentifier(name: MemberName | ThisExpression) {
|
||||
if (isIdentifier(name) && idText(name).indexOf(":") !== -1) {
|
||||
return grammarErrorOnNode(name, Diagnostics.JSX_property_access_expressions_cannot_include_JSX_namespace_names);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2893,10 +2893,6 @@
|
||||
"category": "Error",
|
||||
"code": 2638
|
||||
},
|
||||
"React components cannot include JSX namespace names": {
|
||||
"category": "Error",
|
||||
"code": 2639
|
||||
},
|
||||
|
||||
"Cannot augment module '{0}' with value exports because it resolves to a non-module entity.": {
|
||||
"category": "Error",
|
||||
|
||||
@@ -289,7 +289,6 @@ import {
|
||||
JsxEmit,
|
||||
JsxExpression,
|
||||
JsxFragment,
|
||||
JsxNamespacedName,
|
||||
JsxOpeningElement,
|
||||
JsxOpeningFragment,
|
||||
JsxSelfClosingElement,
|
||||
@@ -2284,8 +2283,6 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
|
||||
return emitJsxSelfClosingElement(node as JsxSelfClosingElement);
|
||||
case SyntaxKind.JsxFragment:
|
||||
return emitJsxFragment(node as JsxFragment);
|
||||
case SyntaxKind.JsxNamespacedName:
|
||||
return emitJsxNamespacedName(node as JsxNamespacedName);
|
||||
|
||||
// Synthesized list
|
||||
case SyntaxKind.SyntaxList:
|
||||
@@ -4228,12 +4225,6 @@ export function createPrinter(printerOptions: PrinterOptions = {}, handlers: Pri
|
||||
}
|
||||
}
|
||||
|
||||
function emitJsxNamespacedName(node: JsxNamespacedName) {
|
||||
emitIdentifierName(node.namespace);
|
||||
writePunctuation(":");
|
||||
emitIdentifierName(node.name);
|
||||
}
|
||||
|
||||
function emitJsxTagName(node: JsxTagNameExpression) {
|
||||
if (node.kind === SyntaxKind.Identifier) {
|
||||
emitExpression(node);
|
||||
|
||||
@@ -267,7 +267,6 @@ import {
|
||||
JSDocVariadicType,
|
||||
JsxAttribute,
|
||||
JsxAttributeLike,
|
||||
JsxAttributeName,
|
||||
JsxAttributes,
|
||||
JsxAttributeValue,
|
||||
JsxChild,
|
||||
@@ -276,7 +275,6 @@ import {
|
||||
JsxElement,
|
||||
JsxExpression,
|
||||
JsxFragment,
|
||||
JsxNamespacedName,
|
||||
JsxOpeningElement,
|
||||
JsxOpeningFragment,
|
||||
JsxSelfClosingElement,
|
||||
@@ -910,8 +908,6 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
updateJsxSpreadAttribute,
|
||||
createJsxExpression,
|
||||
updateJsxExpression,
|
||||
createJsxNamespacedName,
|
||||
updateJsxNamespacedName,
|
||||
createCaseClause,
|
||||
updateCaseClause,
|
||||
createDefaultClause,
|
||||
@@ -5586,7 +5582,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJsxAttribute(name: JsxAttributeName, initializer: JsxAttributeValue | undefined) {
|
||||
function createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined) {
|
||||
const node = createBaseDeclaration<JsxAttribute>(SyntaxKind.JsxAttribute);
|
||||
node.name = name;
|
||||
node.initializer = initializer;
|
||||
@@ -5598,7 +5594,7 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer: JsxAttributeValue | undefined) {
|
||||
function updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined) {
|
||||
return node.name !== name
|
||||
|| node.initializer !== initializer
|
||||
? update(createJsxAttribute(name, initializer), node)
|
||||
@@ -5658,26 +5654,6 @@ export function createNodeFactory(flags: NodeFactoryFlags, baseFactory: BaseNode
|
||||
: node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function createJsxNamespacedName(namespace: Identifier, name: Identifier) {
|
||||
const node = createBaseNode<JsxNamespacedName>(SyntaxKind.JsxNamespacedName);
|
||||
node.namespace = namespace;
|
||||
node.name = name;
|
||||
node.transformFlags |=
|
||||
propagateChildFlags(node.namespace) |
|
||||
propagateChildFlags(node.name) |
|
||||
TransformFlags.ContainsJsx;
|
||||
return node;
|
||||
}
|
||||
|
||||
// @api
|
||||
function updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier) {
|
||||
return node.namespace !== namespace
|
||||
|| node.name !== name
|
||||
? update(createJsxNamespacedName(namespace, name), node)
|
||||
: node;
|
||||
}
|
||||
|
||||
//
|
||||
// Clauses
|
||||
//
|
||||
|
||||
@@ -128,7 +128,6 @@ import {
|
||||
JsxElement,
|
||||
JsxExpression,
|
||||
JsxFragment,
|
||||
JsxNamespacedName,
|
||||
JsxOpeningElement,
|
||||
JsxOpeningFragment,
|
||||
JsxSelfClosingElement,
|
||||
@@ -964,10 +963,6 @@ export function isJsxExpression(node: Node): node is JsxExpression {
|
||||
return node.kind === SyntaxKind.JsxExpression;
|
||||
}
|
||||
|
||||
export function isJsxNamespacedName(node: Node): node is JsxNamespacedName {
|
||||
return node.kind === SyntaxKind.JsxNamespacedName;
|
||||
}
|
||||
|
||||
// Clauses
|
||||
|
||||
export function isCaseClause(node: Node): node is CaseClause {
|
||||
|
||||
+5
-37
@@ -221,7 +221,6 @@ import {
|
||||
JsxElement,
|
||||
JsxExpression,
|
||||
JsxFragment,
|
||||
JsxNamespacedName,
|
||||
JsxOpeningElement,
|
||||
JsxOpeningFragment,
|
||||
JsxOpeningLikeElement,
|
||||
@@ -1031,10 +1030,6 @@ const forEachChildTable: ForEachChildTable = {
|
||||
[SyntaxKind.JsxClosingElement]: function forEachChildInJsxClosingElement<T>(node: JsxClosingElement, cbNode: (node: Node) => T | undefined, _cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined {
|
||||
return visitNode(cbNode, node.tagName);
|
||||
},
|
||||
[SyntaxKind.JsxNamespacedName]: function forEachChildInJsxNamespacedName<T>(node: JsxNamespacedName, cbNode: (node: Node) => T | undefined, _cbNodes?: (nodes: NodeArray<Node>) => T | undefined): T | undefined {
|
||||
return visitNode(cbNode, node.namespace) ||
|
||||
visitNode(cbNode, node.name);
|
||||
},
|
||||
[SyntaxKind.OptionalType]: forEachChildInOptionalRestOrJSDocParameterModifier,
|
||||
[SyntaxKind.RestType]: forEachChildInOptionalRestOrJSDocParameterModifier,
|
||||
[SyntaxKind.JSDocTypeExpression]: forEachChildInOptionalRestOrJSDocParameterModifier,
|
||||
@@ -6107,31 +6102,20 @@ namespace Parser {
|
||||
|
||||
function parseJsxElementName(): JsxTagNameExpression {
|
||||
const pos = getNodePos();
|
||||
scanJsxIdentifier();
|
||||
// JsxElement can have name in the form of
|
||||
// propertyAccessExpression
|
||||
// primaryExpression in the form of an identifier and "this" keyword
|
||||
// We can't just simply use parseLeftHandSideExpressionOrHigher because then we will start consider class,function etc as a keyword
|
||||
// We only want to consider "this" as a primaryExpression
|
||||
let expression: JsxTagNameExpression = parseJsxTagName();
|
||||
let expression: JsxTagNameExpression = token() === SyntaxKind.ThisKeyword ?
|
||||
parseTokenNode<ThisExpression>() : parseIdentifierName();
|
||||
while (parseOptional(SyntaxKind.DotToken)) {
|
||||
expression = finishNode(factoryCreatePropertyAccessExpression(expression, parseRightSideOfDot(/*allowIdentifierNames*/ true, /*allowPrivateIdentifiers*/ false)), pos) as JsxTagNamePropertyAccess;
|
||||
}
|
||||
return expression;
|
||||
}
|
||||
|
||||
function parseJsxTagName(): Identifier | JsxNamespacedName | ThisExpression {
|
||||
const pos = getNodePos();
|
||||
scanJsxIdentifier();
|
||||
|
||||
const isThis = token() === SyntaxKind.ThisKeyword;
|
||||
const tagName = parseIdentifierName();
|
||||
if (parseOptional(SyntaxKind.ColonToken)) {
|
||||
scanJsxIdentifier();
|
||||
return finishNode(factory.createJsxNamespacedName(tagName, parseIdentifierName()), pos);
|
||||
}
|
||||
return isThis ? finishNode(factory.createToken(SyntaxKind.ThisKeyword), pos) : tagName;
|
||||
}
|
||||
|
||||
function parseJsxExpression(inExpressionContext: boolean): JsxExpression | undefined {
|
||||
const pos = getNodePos();
|
||||
if (!parseExpected(SyntaxKind.OpenBraceToken)) {
|
||||
@@ -6164,8 +6148,9 @@ namespace Parser {
|
||||
return parseJsxSpreadAttribute();
|
||||
}
|
||||
|
||||
scanJsxIdentifier();
|
||||
const pos = getNodePos();
|
||||
return finishNode(factory.createJsxAttribute(parseJsxAttributeName(), parseJsxAttributeValue()), pos);
|
||||
return finishNode(factory.createJsxAttribute(parseIdentifierName(), parseJsxAttributeValue()), pos);
|
||||
}
|
||||
|
||||
function parseJsxAttributeValue(): JsxAttributeValue | undefined {
|
||||
@@ -6184,18 +6169,6 @@ namespace Parser {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
function parseJsxAttributeName() {
|
||||
const pos = getNodePos();
|
||||
scanJsxIdentifier();
|
||||
|
||||
const attrName = parseIdentifierName();
|
||||
if (parseOptional(SyntaxKind.ColonToken)) {
|
||||
scanJsxIdentifier();
|
||||
return finishNode(factory.createJsxNamespacedName(attrName, parseIdentifierName()), pos);
|
||||
}
|
||||
return attrName;
|
||||
}
|
||||
|
||||
function parseJsxSpreadAttribute(): JsxSpreadAttribute {
|
||||
const pos = getNodePos();
|
||||
parseExpected(SyntaxKind.OpenBraceToken);
|
||||
@@ -10452,11 +10425,6 @@ export function tagNamesAreEquivalent(lhs: JsxTagNameExpression, rhs: JsxTagName
|
||||
return true;
|
||||
}
|
||||
|
||||
if (lhs.kind === SyntaxKind.JsxNamespacedName) {
|
||||
return lhs.namespace.escapedText === (rhs as JsxNamespacedName).namespace.escapedText &&
|
||||
lhs.name.escapedText === (rhs as JsxNamespacedName).name.escapedText;
|
||||
}
|
||||
|
||||
// If we are at this statement then we must have PropertyAccessExpression and because tag name in Jsx element can only
|
||||
// take forms of JsxTagNameExpression which includes an identifier, "this" expression, or another propertyAccessExpression
|
||||
// it is safe to case the expression property as such. See parseJsxElementName for how we parse tag name in Jsx element
|
||||
|
||||
@@ -2543,6 +2543,7 @@ export function createScanner(languageVersion: ScriptTarget,
|
||||
// everything after it to the token
|
||||
// Do note that this means that `scanJsxIdentifier` effectively _mutates_ the visible token without advancing to a new token
|
||||
// Any caller should be expecting this behavior and should only read the pos or token value after calling it.
|
||||
let namespaceSeparator = false;
|
||||
while (pos < end) {
|
||||
const ch = text.charCodeAt(pos);
|
||||
if (ch === CharacterCodes.minus) {
|
||||
@@ -2550,12 +2551,24 @@ export function createScanner(languageVersion: ScriptTarget,
|
||||
pos++;
|
||||
continue;
|
||||
}
|
||||
else if (ch === CharacterCodes.colon && !namespaceSeparator) {
|
||||
tokenValue += ":";
|
||||
pos++;
|
||||
namespaceSeparator = true;
|
||||
token = SyntaxKind.Identifier; // swap from keyword kind to identifier kind
|
||||
continue;
|
||||
}
|
||||
const oldPos = pos;
|
||||
tokenValue += scanIdentifierParts(); // reuse `scanIdentifierParts` so unicode escapes are handled
|
||||
if (pos === oldPos) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Do not include a trailing namespace separator in the token, since this is against the spec.
|
||||
if (tokenValue.slice(-1) === ":") {
|
||||
tokenValue = tokenValue.slice(0, -1);
|
||||
pos--;
|
||||
}
|
||||
return getIdentifierToken();
|
||||
}
|
||||
return token;
|
||||
|
||||
@@ -32,7 +32,6 @@ import {
|
||||
isJsxAttribute,
|
||||
isJsxElement,
|
||||
isJsxFragment,
|
||||
isJsxNamespacedName,
|
||||
isJsxSelfClosingElement,
|
||||
isJsxSpreadAttribute,
|
||||
isLineBreak,
|
||||
@@ -263,7 +262,7 @@ export function transformJsx(context: TransformationContext): (x: SourceFile | B
|
||||
if (isJsxSpreadAttribute(elem) && (!isObjectLiteralExpression(elem.expression) || elem.expression.properties.some(isSpreadAssignment))) {
|
||||
spread = true;
|
||||
}
|
||||
else if (spread && isJsxAttribute(elem) && isIdentifier(elem.name) && elem.name.escapedText === "key") {
|
||||
else if (spread && isJsxAttribute(elem) && elem.name.escapedText === "key") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -640,15 +639,12 @@ export function transformJsx(context: TransformationContext): (x: SourceFile | B
|
||||
return getTagName(node.openingElement);
|
||||
}
|
||||
else {
|
||||
const tagName = node.tagName;
|
||||
if (isIdentifier(tagName) && isIntrinsicJsxName(tagName.escapedText)) {
|
||||
return factory.createStringLiteral(idText(tagName));
|
||||
}
|
||||
else if (isJsxNamespacedName(tagName)) {
|
||||
return factory.createStringLiteral(idText(tagName.namespace) + ":" + idText(tagName.name));
|
||||
const name = node.tagName;
|
||||
if (isIdentifier(name) && isIntrinsicJsxName(name.escapedText)) {
|
||||
return factory.createStringLiteral(idText(name));
|
||||
}
|
||||
else {
|
||||
return createExpressionFromEntityName(factory, tagName);
|
||||
return createExpressionFromEntityName(factory, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -660,11 +656,13 @@ export function transformJsx(context: TransformationContext): (x: SourceFile | B
|
||||
*/
|
||||
function getAttributeName(node: JsxAttribute): StringLiteral | Identifier {
|
||||
const name = node.name;
|
||||
if (isIdentifier(name)) {
|
||||
const text = idText(name);
|
||||
return (/^[A-Za-z_]\w*$/.test(text)) ? name : factory.createStringLiteral(text);
|
||||
const text = idText(name);
|
||||
if (/^[A-Za-z_]\w*$/.test(text)) {
|
||||
return name;
|
||||
}
|
||||
else {
|
||||
return factory.createStringLiteral(text);
|
||||
}
|
||||
return factory.createStringLiteral(idText(name.namespace) + ":" + idText(name.name));
|
||||
}
|
||||
|
||||
function visitJsxExpression(node: JsxExpression) {
|
||||
|
||||
+5
-23
@@ -367,7 +367,6 @@ export const enum SyntaxKind {
|
||||
JsxAttributes,
|
||||
JsxSpreadAttribute,
|
||||
JsxExpression,
|
||||
JsxNamespacedName,
|
||||
|
||||
// Clauses
|
||||
CaseClause,
|
||||
@@ -1154,7 +1153,6 @@ export type HasChildren =
|
||||
| JsxAttributes
|
||||
| JsxSpreadAttribute
|
||||
| JsxExpression
|
||||
| JsxNamespacedName
|
||||
| CaseClause
|
||||
| DefaultClause
|
||||
| HeritageClause
|
||||
@@ -3179,34 +3177,21 @@ export type JsxAttributeLike =
|
||||
| JsxSpreadAttribute
|
||||
;
|
||||
|
||||
export type JsxAttributeName =
|
||||
| Identifier
|
||||
| JsxNamespacedName
|
||||
;
|
||||
|
||||
export type JsxTagNameExpression =
|
||||
| Identifier
|
||||
| ThisExpression
|
||||
| JsxTagNamePropertyAccess
|
||||
| JsxNamespacedName
|
||||
;
|
||||
|
||||
export interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
|
||||
readonly expression: JsxTagNameExpression;
|
||||
}
|
||||
|
||||
export interface JsxAttributes extends PrimaryExpression, Declaration {
|
||||
readonly properties: NodeArray<JsxAttributeLike>;
|
||||
export interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
|
||||
readonly kind: SyntaxKind.JsxAttributes;
|
||||
readonly parent: JsxOpeningLikeElement;
|
||||
}
|
||||
|
||||
export interface JsxNamespacedName extends PrimaryExpression {
|
||||
readonly kind: SyntaxKind.JsxNamespacedName;
|
||||
readonly name: Identifier;
|
||||
readonly namespace: Identifier;
|
||||
}
|
||||
|
||||
/// The opening element of a <Tag>...</Tag> JsxElement
|
||||
export interface JsxOpeningElement extends Expression {
|
||||
readonly kind: SyntaxKind.JsxOpeningElement;
|
||||
@@ -3244,10 +3229,10 @@ export interface JsxClosingFragment extends Expression {
|
||||
readonly parent: JsxFragment;
|
||||
}
|
||||
|
||||
export interface JsxAttribute extends Declaration {
|
||||
export interface JsxAttribute extends ObjectLiteralElement {
|
||||
readonly kind: SyntaxKind.JsxAttribute;
|
||||
readonly parent: JsxAttributes;
|
||||
readonly name: JsxAttributeName;
|
||||
readonly name: Identifier;
|
||||
/// JSX attribute initializers are optional; <X y /> is sugar for <X y={true} />
|
||||
readonly initializer?: JsxAttributeValue;
|
||||
}
|
||||
@@ -3261,7 +3246,6 @@ export type JsxAttributeValue =
|
||||
|
||||
export interface JsxSpreadAttribute extends ObjectLiteralElement {
|
||||
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
||||
readonly name: PropertyName;
|
||||
readonly parent: JsxAttributes;
|
||||
readonly expression: Expression;
|
||||
}
|
||||
@@ -8730,16 +8714,14 @@ export interface NodeFactory {
|
||||
createJsxOpeningFragment(): JsxOpeningFragment;
|
||||
createJsxJsxClosingFragment(): JsxClosingFragment;
|
||||
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
||||
createJsxAttribute(name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
|
||||
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
|
||||
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
|
||||
updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
|
||||
createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
|
||||
updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
|
||||
createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName;
|
||||
updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName;
|
||||
|
||||
//
|
||||
// Clauses
|
||||
|
||||
@@ -355,7 +355,6 @@ import {
|
||||
JSDocTemplateTag,
|
||||
JSDocTypedefTag,
|
||||
JsonSourceFile,
|
||||
JsxAttributeName,
|
||||
JsxChild,
|
||||
JsxElement,
|
||||
JsxEmit,
|
||||
@@ -2063,8 +2062,6 @@ export function entityNameToString(name: EntityNameOrEntityNameExpression | JSDo
|
||||
}
|
||||
case SyntaxKind.JSDocMemberName:
|
||||
return entityNameToString(name.left) + entityNameToString(name.right);
|
||||
case SyntaxKind.JsxNamespacedName:
|
||||
return entityNameToString(name.namespace) + ":" + entityNameToString(name.name);
|
||||
default:
|
||||
return Debug.assertNever(name);
|
||||
}
|
||||
@@ -10165,20 +10162,3 @@ export function tryGetJSDocSatisfiesTypeNode(node: Node) {
|
||||
const tag = getJSDocSatisfiesTag(node);
|
||||
return tag && tag.typeExpression && tag.typeExpression.type;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getEscapedTextOfJsxAttributeName(node: JsxAttributeName): __String {
|
||||
return isIdentifier(node) ? node.escapedText : `${node.namespace.escapedText}:${idText(node.name)}` as __String;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function getTextOfJsxAttributeName(node: JsxAttributeName): string {
|
||||
return isIdentifier(node) ? idText(node) : `${idText(node.namespace)}:${idText(node.name)}`;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function isJsxAttributeName(node: Node): node is JsxAttributeName {
|
||||
const kind = node.kind;
|
||||
return kind === SyntaxKind.Identifier
|
||||
|| kind === SyntaxKind.JsxNamespacedName;
|
||||
}
|
||||
|
||||
@@ -1941,7 +1941,6 @@ function isLeftHandSideExpressionKind(kind: SyntaxKind): boolean {
|
||||
case SyntaxKind.JsxElement:
|
||||
case SyntaxKind.JsxSelfClosingElement:
|
||||
case SyntaxKind.JsxFragment:
|
||||
case SyntaxKind.JsxNamespacedName:
|
||||
case SyntaxKind.TaggedTemplateExpression:
|
||||
case SyntaxKind.ArrayLiteralExpression:
|
||||
case SyntaxKind.ParenthesizedExpression:
|
||||
@@ -2407,8 +2406,7 @@ export function isJsxTagNameExpression(node: Node): node is JsxTagNameExpression
|
||||
const kind = node.kind;
|
||||
return kind === SyntaxKind.ThisKeyword
|
||||
|| kind === SyntaxKind.Identifier
|
||||
|| kind === SyntaxKind.PropertyAccessExpression
|
||||
|| kind === SyntaxKind.JsxNamespacedName;
|
||||
|| kind === SyntaxKind.PropertyAccessExpression;
|
||||
}
|
||||
|
||||
export function isJsxChild(node: Node): node is JsxChild {
|
||||
|
||||
@@ -46,7 +46,6 @@ import {
|
||||
isImportSpecifier,
|
||||
isImportTypeAssertionContainer,
|
||||
isJsxAttributeLike,
|
||||
isJsxAttributeName,
|
||||
isJsxAttributes,
|
||||
isJsxChild,
|
||||
isJsxClosingElement,
|
||||
@@ -1430,12 +1429,6 @@ const visitEachChildTable: VisitEachChildTable = {
|
||||
Debug.checkDefined(nodeVisitor(node.tagName, visitor, isJsxTagNameExpression)));
|
||||
},
|
||||
|
||||
[SyntaxKind.JsxNamespacedName]: function forEachChildInJsxNamespacedName(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
||||
return context.factory.updateJsxNamespacedName(node,
|
||||
Debug.checkDefined(nodeVisitor(node.namespace, visitor, isIdentifier)),
|
||||
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)));
|
||||
},
|
||||
|
||||
[SyntaxKind.JsxFragment]: function visitEachChildOfJsxFragment(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
||||
return context.factory.updateJsxFragment(node,
|
||||
Debug.checkDefined(nodeVisitor(node.openingFragment, visitor, isJsxOpeningFragment)),
|
||||
@@ -1445,7 +1438,7 @@ const visitEachChildTable: VisitEachChildTable = {
|
||||
|
||||
[SyntaxKind.JsxAttribute]: function visitEachChildOfJsxAttribute(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
||||
return context.factory.updateJsxAttribute(node,
|
||||
Debug.checkDefined(nodeVisitor(node.name, visitor, isJsxAttributeName)),
|
||||
Debug.checkDefined(nodeVisitor(node.name, visitor, isIdentifier)),
|
||||
nodeVisitor(node.initializer, visitor, isStringLiteralOrJsxExpression));
|
||||
},
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import {
|
||||
getCheckFlags,
|
||||
getClassLikeDeclarationOfSymbol,
|
||||
getEmitScriptTarget,
|
||||
getEscapedTextOfJsxAttributeName,
|
||||
getFirstConstructorWithBody,
|
||||
getNodeId,
|
||||
getObjectFlags,
|
||||
@@ -743,7 +742,7 @@ function getUnmatchedAttributes(checker: TypeChecker, target: ScriptTarget, sour
|
||||
const seenNames = new Set<__String>();
|
||||
for (const sourceProp of source.attributes.properties) {
|
||||
if (isJsxAttribute(sourceProp)) {
|
||||
seenNames.add(getEscapedTextOfJsxAttributeName(sourceProp.name));
|
||||
seenNames.add(sourceProp.name.escapedText);
|
||||
}
|
||||
if (isJsxSpreadAttribute(sourceProp)) {
|
||||
const type = checker.getTypeAtLocation(sourceProp.expression);
|
||||
|
||||
@@ -82,7 +82,6 @@ import {
|
||||
getEmitModuleResolutionKind,
|
||||
getEmitScriptTarget,
|
||||
getEscapedTextOfIdentifierOrLiteral,
|
||||
getEscapedTextOfJsxAttributeName,
|
||||
getExportInfoMap,
|
||||
getFormatCodeSettingsForWriting,
|
||||
getJSDocParameterTags,
|
||||
@@ -4810,7 +4809,7 @@ function getCompletionData(
|
||||
}
|
||||
|
||||
if (attr.kind === SyntaxKind.JsxAttribute) {
|
||||
seenNames.add(getEscapedTextOfJsxAttributeName(attr.name));
|
||||
seenNames.add(attr.name.escapedText);
|
||||
}
|
||||
else if (isJsxSpreadAttribute(attr)) {
|
||||
setMembersDeclaredBySpreadAssignment(attr, membersDeclaredBySpreadAssignment);
|
||||
|
||||
@@ -59,7 +59,6 @@ import {
|
||||
getResolvePackageJsonExports,
|
||||
getSupportedExtensions,
|
||||
getSupportedExtensionsWithJsonIfResolveJsonModule,
|
||||
getTextOfJsxAttributeName,
|
||||
getTokenAtPosition,
|
||||
hasIndexSignature,
|
||||
hasProperty,
|
||||
@@ -488,7 +487,7 @@ function getStringLiteralCompletionsFromSignature(call: CallLikeExpression, arg:
|
||||
if (!signatureHasRestParameter(candidate) && argumentInfo.argumentCount > candidate.parameters.length) return;
|
||||
let type = candidate.getTypeParameterAtPosition(argumentInfo.argumentIndex);
|
||||
if (isJsxOpeningLikeElement(call)) {
|
||||
const propType = checker.getTypeOfPropertyOfType(type, getTextOfJsxAttributeName((editingArgument as JsxAttribute).name));
|
||||
const propType = checker.getTypeOfPropertyOfType(type, (editingArgument as JsxAttribute).name.text);
|
||||
if (propType) {
|
||||
type = propType;
|
||||
}
|
||||
|
||||
+81
-93
@@ -4350,79 +4350,78 @@ declare namespace ts {
|
||||
JsxAttributes = 291,
|
||||
JsxSpreadAttribute = 292,
|
||||
JsxExpression = 293,
|
||||
JsxNamespacedName = 294,
|
||||
CaseClause = 295,
|
||||
DefaultClause = 296,
|
||||
HeritageClause = 297,
|
||||
CatchClause = 298,
|
||||
AssertClause = 299,
|
||||
AssertEntry = 300,
|
||||
ImportTypeAssertionContainer = 301,
|
||||
PropertyAssignment = 302,
|
||||
ShorthandPropertyAssignment = 303,
|
||||
SpreadAssignment = 304,
|
||||
EnumMember = 305,
|
||||
/** @deprecated */ UnparsedPrologue = 306,
|
||||
/** @deprecated */ UnparsedPrepend = 307,
|
||||
/** @deprecated */ UnparsedText = 308,
|
||||
/** @deprecated */ UnparsedInternalText = 309,
|
||||
/** @deprecated */ UnparsedSyntheticReference = 310,
|
||||
SourceFile = 311,
|
||||
Bundle = 312,
|
||||
/** @deprecated */ UnparsedSource = 313,
|
||||
/** @deprecated */ InputFiles = 314,
|
||||
JSDocTypeExpression = 315,
|
||||
JSDocNameReference = 316,
|
||||
JSDocMemberName = 317,
|
||||
JSDocAllType = 318,
|
||||
JSDocUnknownType = 319,
|
||||
JSDocNullableType = 320,
|
||||
JSDocNonNullableType = 321,
|
||||
JSDocOptionalType = 322,
|
||||
JSDocFunctionType = 323,
|
||||
JSDocVariadicType = 324,
|
||||
JSDocNamepathType = 325,
|
||||
JSDoc = 326,
|
||||
CaseClause = 294,
|
||||
DefaultClause = 295,
|
||||
HeritageClause = 296,
|
||||
CatchClause = 297,
|
||||
AssertClause = 298,
|
||||
AssertEntry = 299,
|
||||
ImportTypeAssertionContainer = 300,
|
||||
PropertyAssignment = 301,
|
||||
ShorthandPropertyAssignment = 302,
|
||||
SpreadAssignment = 303,
|
||||
EnumMember = 304,
|
||||
/** @deprecated */ UnparsedPrologue = 305,
|
||||
/** @deprecated */ UnparsedPrepend = 306,
|
||||
/** @deprecated */ UnparsedText = 307,
|
||||
/** @deprecated */ UnparsedInternalText = 308,
|
||||
/** @deprecated */ UnparsedSyntheticReference = 309,
|
||||
SourceFile = 310,
|
||||
Bundle = 311,
|
||||
/** @deprecated */ UnparsedSource = 312,
|
||||
/** @deprecated */ InputFiles = 313,
|
||||
JSDocTypeExpression = 314,
|
||||
JSDocNameReference = 315,
|
||||
JSDocMemberName = 316,
|
||||
JSDocAllType = 317,
|
||||
JSDocUnknownType = 318,
|
||||
JSDocNullableType = 319,
|
||||
JSDocNonNullableType = 320,
|
||||
JSDocOptionalType = 321,
|
||||
JSDocFunctionType = 322,
|
||||
JSDocVariadicType = 323,
|
||||
JSDocNamepathType = 324,
|
||||
JSDoc = 325,
|
||||
/** @deprecated Use SyntaxKind.JSDoc */
|
||||
JSDocComment = 326,
|
||||
JSDocText = 327,
|
||||
JSDocTypeLiteral = 328,
|
||||
JSDocSignature = 329,
|
||||
JSDocLink = 330,
|
||||
JSDocLinkCode = 331,
|
||||
JSDocLinkPlain = 332,
|
||||
JSDocTag = 333,
|
||||
JSDocAugmentsTag = 334,
|
||||
JSDocImplementsTag = 335,
|
||||
JSDocAuthorTag = 336,
|
||||
JSDocDeprecatedTag = 337,
|
||||
JSDocClassTag = 338,
|
||||
JSDocPublicTag = 339,
|
||||
JSDocPrivateTag = 340,
|
||||
JSDocProtectedTag = 341,
|
||||
JSDocReadonlyTag = 342,
|
||||
JSDocOverrideTag = 343,
|
||||
JSDocCallbackTag = 344,
|
||||
JSDocOverloadTag = 345,
|
||||
JSDocEnumTag = 346,
|
||||
JSDocParameterTag = 347,
|
||||
JSDocReturnTag = 348,
|
||||
JSDocThisTag = 349,
|
||||
JSDocTypeTag = 350,
|
||||
JSDocTemplateTag = 351,
|
||||
JSDocTypedefTag = 352,
|
||||
JSDocSeeTag = 353,
|
||||
JSDocPropertyTag = 354,
|
||||
JSDocThrowsTag = 355,
|
||||
JSDocSatisfiesTag = 356,
|
||||
SyntaxList = 357,
|
||||
NotEmittedStatement = 358,
|
||||
PartiallyEmittedExpression = 359,
|
||||
CommaListExpression = 360,
|
||||
MergeDeclarationMarker = 361,
|
||||
EndOfDeclarationMarker = 362,
|
||||
SyntheticReferenceExpression = 363,
|
||||
Count = 364,
|
||||
JSDocComment = 325,
|
||||
JSDocText = 326,
|
||||
JSDocTypeLiteral = 327,
|
||||
JSDocSignature = 328,
|
||||
JSDocLink = 329,
|
||||
JSDocLinkCode = 330,
|
||||
JSDocLinkPlain = 331,
|
||||
JSDocTag = 332,
|
||||
JSDocAugmentsTag = 333,
|
||||
JSDocImplementsTag = 334,
|
||||
JSDocAuthorTag = 335,
|
||||
JSDocDeprecatedTag = 336,
|
||||
JSDocClassTag = 337,
|
||||
JSDocPublicTag = 338,
|
||||
JSDocPrivateTag = 339,
|
||||
JSDocProtectedTag = 340,
|
||||
JSDocReadonlyTag = 341,
|
||||
JSDocOverrideTag = 342,
|
||||
JSDocCallbackTag = 343,
|
||||
JSDocOverloadTag = 344,
|
||||
JSDocEnumTag = 345,
|
||||
JSDocParameterTag = 346,
|
||||
JSDocReturnTag = 347,
|
||||
JSDocThisTag = 348,
|
||||
JSDocTypeTag = 349,
|
||||
JSDocTemplateTag = 350,
|
||||
JSDocTypedefTag = 351,
|
||||
JSDocSeeTag = 352,
|
||||
JSDocPropertyTag = 353,
|
||||
JSDocThrowsTag = 354,
|
||||
JSDocSatisfiesTag = 355,
|
||||
SyntaxList = 356,
|
||||
NotEmittedStatement = 357,
|
||||
PartiallyEmittedExpression = 358,
|
||||
CommaListExpression = 359,
|
||||
MergeDeclarationMarker = 360,
|
||||
EndOfDeclarationMarker = 361,
|
||||
SyntheticReferenceExpression = 362,
|
||||
Count = 363,
|
||||
FirstAssignment = 64,
|
||||
LastAssignment = 79,
|
||||
FirstCompoundAssignment = 65,
|
||||
@@ -4450,10 +4449,10 @@ declare namespace ts {
|
||||
FirstStatement = 242,
|
||||
LastStatement = 258,
|
||||
FirstNode = 165,
|
||||
FirstJSDocNode = 315,
|
||||
LastJSDocNode = 356,
|
||||
FirstJSDocTagNode = 333,
|
||||
LastJSDocTagNode = 356
|
||||
FirstJSDocNode = 314,
|
||||
LastJSDocNode = 355,
|
||||
FirstJSDocTagNode = 332,
|
||||
LastJSDocTagNode = 355
|
||||
}
|
||||
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
||||
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
@@ -5361,21 +5360,14 @@ declare namespace ts {
|
||||
}
|
||||
type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
|
||||
type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
|
||||
type JsxAttributeName = Identifier | JsxNamespacedName;
|
||||
type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName;
|
||||
type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
|
||||
interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
|
||||
readonly expression: JsxTagNameExpression;
|
||||
}
|
||||
interface JsxAttributes extends PrimaryExpression, Declaration {
|
||||
readonly properties: NodeArray<JsxAttributeLike>;
|
||||
interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
|
||||
readonly kind: SyntaxKind.JsxAttributes;
|
||||
readonly parent: JsxOpeningLikeElement;
|
||||
}
|
||||
interface JsxNamespacedName extends PrimaryExpression {
|
||||
readonly kind: SyntaxKind.JsxNamespacedName;
|
||||
readonly name: Identifier;
|
||||
readonly namespace: Identifier;
|
||||
}
|
||||
interface JsxOpeningElement extends Expression {
|
||||
readonly kind: SyntaxKind.JsxOpeningElement;
|
||||
readonly parent: JsxElement;
|
||||
@@ -5403,16 +5395,15 @@ declare namespace ts {
|
||||
readonly kind: SyntaxKind.JsxClosingFragment;
|
||||
readonly parent: JsxFragment;
|
||||
}
|
||||
interface JsxAttribute extends Declaration {
|
||||
interface JsxAttribute extends ObjectLiteralElement {
|
||||
readonly kind: SyntaxKind.JsxAttribute;
|
||||
readonly parent: JsxAttributes;
|
||||
readonly name: JsxAttributeName;
|
||||
readonly name: Identifier;
|
||||
readonly initializer?: JsxAttributeValue;
|
||||
}
|
||||
type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
||||
interface JsxSpreadAttribute extends ObjectLiteralElement {
|
||||
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
||||
readonly name: PropertyName;
|
||||
readonly parent: JsxAttributes;
|
||||
readonly expression: Expression;
|
||||
}
|
||||
@@ -7949,16 +7940,14 @@ declare namespace ts {
|
||||
createJsxOpeningFragment(): JsxOpeningFragment;
|
||||
createJsxJsxClosingFragment(): JsxClosingFragment;
|
||||
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
||||
createJsxAttribute(name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
|
||||
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
|
||||
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
|
||||
updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
|
||||
createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
|
||||
updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
|
||||
createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName;
|
||||
updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName;
|
||||
createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
|
||||
updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
|
||||
createDefaultClause(statements: readonly Statement[]): DefaultClause;
|
||||
@@ -9029,7 +9018,6 @@ declare namespace ts {
|
||||
function isJsxAttributes(node: Node): node is JsxAttributes;
|
||||
function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
|
||||
function isJsxExpression(node: Node): node is JsxExpression;
|
||||
function isJsxNamespacedName(node: Node): node is JsxNamespacedName;
|
||||
function isCaseClause(node: Node): node is CaseClause;
|
||||
function isDefaultClause(node: Node): node is DefaultClause;
|
||||
function isHeritageClause(node: Node): node is HeritageClause;
|
||||
|
||||
+81
-93
@@ -338,79 +338,78 @@ declare namespace ts {
|
||||
JsxAttributes = 291,
|
||||
JsxSpreadAttribute = 292,
|
||||
JsxExpression = 293,
|
||||
JsxNamespacedName = 294,
|
||||
CaseClause = 295,
|
||||
DefaultClause = 296,
|
||||
HeritageClause = 297,
|
||||
CatchClause = 298,
|
||||
AssertClause = 299,
|
||||
AssertEntry = 300,
|
||||
ImportTypeAssertionContainer = 301,
|
||||
PropertyAssignment = 302,
|
||||
ShorthandPropertyAssignment = 303,
|
||||
SpreadAssignment = 304,
|
||||
EnumMember = 305,
|
||||
/** @deprecated */ UnparsedPrologue = 306,
|
||||
/** @deprecated */ UnparsedPrepend = 307,
|
||||
/** @deprecated */ UnparsedText = 308,
|
||||
/** @deprecated */ UnparsedInternalText = 309,
|
||||
/** @deprecated */ UnparsedSyntheticReference = 310,
|
||||
SourceFile = 311,
|
||||
Bundle = 312,
|
||||
/** @deprecated */ UnparsedSource = 313,
|
||||
/** @deprecated */ InputFiles = 314,
|
||||
JSDocTypeExpression = 315,
|
||||
JSDocNameReference = 316,
|
||||
JSDocMemberName = 317,
|
||||
JSDocAllType = 318,
|
||||
JSDocUnknownType = 319,
|
||||
JSDocNullableType = 320,
|
||||
JSDocNonNullableType = 321,
|
||||
JSDocOptionalType = 322,
|
||||
JSDocFunctionType = 323,
|
||||
JSDocVariadicType = 324,
|
||||
JSDocNamepathType = 325,
|
||||
JSDoc = 326,
|
||||
CaseClause = 294,
|
||||
DefaultClause = 295,
|
||||
HeritageClause = 296,
|
||||
CatchClause = 297,
|
||||
AssertClause = 298,
|
||||
AssertEntry = 299,
|
||||
ImportTypeAssertionContainer = 300,
|
||||
PropertyAssignment = 301,
|
||||
ShorthandPropertyAssignment = 302,
|
||||
SpreadAssignment = 303,
|
||||
EnumMember = 304,
|
||||
/** @deprecated */ UnparsedPrologue = 305,
|
||||
/** @deprecated */ UnparsedPrepend = 306,
|
||||
/** @deprecated */ UnparsedText = 307,
|
||||
/** @deprecated */ UnparsedInternalText = 308,
|
||||
/** @deprecated */ UnparsedSyntheticReference = 309,
|
||||
SourceFile = 310,
|
||||
Bundle = 311,
|
||||
/** @deprecated */ UnparsedSource = 312,
|
||||
/** @deprecated */ InputFiles = 313,
|
||||
JSDocTypeExpression = 314,
|
||||
JSDocNameReference = 315,
|
||||
JSDocMemberName = 316,
|
||||
JSDocAllType = 317,
|
||||
JSDocUnknownType = 318,
|
||||
JSDocNullableType = 319,
|
||||
JSDocNonNullableType = 320,
|
||||
JSDocOptionalType = 321,
|
||||
JSDocFunctionType = 322,
|
||||
JSDocVariadicType = 323,
|
||||
JSDocNamepathType = 324,
|
||||
JSDoc = 325,
|
||||
/** @deprecated Use SyntaxKind.JSDoc */
|
||||
JSDocComment = 326,
|
||||
JSDocText = 327,
|
||||
JSDocTypeLiteral = 328,
|
||||
JSDocSignature = 329,
|
||||
JSDocLink = 330,
|
||||
JSDocLinkCode = 331,
|
||||
JSDocLinkPlain = 332,
|
||||
JSDocTag = 333,
|
||||
JSDocAugmentsTag = 334,
|
||||
JSDocImplementsTag = 335,
|
||||
JSDocAuthorTag = 336,
|
||||
JSDocDeprecatedTag = 337,
|
||||
JSDocClassTag = 338,
|
||||
JSDocPublicTag = 339,
|
||||
JSDocPrivateTag = 340,
|
||||
JSDocProtectedTag = 341,
|
||||
JSDocReadonlyTag = 342,
|
||||
JSDocOverrideTag = 343,
|
||||
JSDocCallbackTag = 344,
|
||||
JSDocOverloadTag = 345,
|
||||
JSDocEnumTag = 346,
|
||||
JSDocParameterTag = 347,
|
||||
JSDocReturnTag = 348,
|
||||
JSDocThisTag = 349,
|
||||
JSDocTypeTag = 350,
|
||||
JSDocTemplateTag = 351,
|
||||
JSDocTypedefTag = 352,
|
||||
JSDocSeeTag = 353,
|
||||
JSDocPropertyTag = 354,
|
||||
JSDocThrowsTag = 355,
|
||||
JSDocSatisfiesTag = 356,
|
||||
SyntaxList = 357,
|
||||
NotEmittedStatement = 358,
|
||||
PartiallyEmittedExpression = 359,
|
||||
CommaListExpression = 360,
|
||||
MergeDeclarationMarker = 361,
|
||||
EndOfDeclarationMarker = 362,
|
||||
SyntheticReferenceExpression = 363,
|
||||
Count = 364,
|
||||
JSDocComment = 325,
|
||||
JSDocText = 326,
|
||||
JSDocTypeLiteral = 327,
|
||||
JSDocSignature = 328,
|
||||
JSDocLink = 329,
|
||||
JSDocLinkCode = 330,
|
||||
JSDocLinkPlain = 331,
|
||||
JSDocTag = 332,
|
||||
JSDocAugmentsTag = 333,
|
||||
JSDocImplementsTag = 334,
|
||||
JSDocAuthorTag = 335,
|
||||
JSDocDeprecatedTag = 336,
|
||||
JSDocClassTag = 337,
|
||||
JSDocPublicTag = 338,
|
||||
JSDocPrivateTag = 339,
|
||||
JSDocProtectedTag = 340,
|
||||
JSDocReadonlyTag = 341,
|
||||
JSDocOverrideTag = 342,
|
||||
JSDocCallbackTag = 343,
|
||||
JSDocOverloadTag = 344,
|
||||
JSDocEnumTag = 345,
|
||||
JSDocParameterTag = 346,
|
||||
JSDocReturnTag = 347,
|
||||
JSDocThisTag = 348,
|
||||
JSDocTypeTag = 349,
|
||||
JSDocTemplateTag = 350,
|
||||
JSDocTypedefTag = 351,
|
||||
JSDocSeeTag = 352,
|
||||
JSDocPropertyTag = 353,
|
||||
JSDocThrowsTag = 354,
|
||||
JSDocSatisfiesTag = 355,
|
||||
SyntaxList = 356,
|
||||
NotEmittedStatement = 357,
|
||||
PartiallyEmittedExpression = 358,
|
||||
CommaListExpression = 359,
|
||||
MergeDeclarationMarker = 360,
|
||||
EndOfDeclarationMarker = 361,
|
||||
SyntheticReferenceExpression = 362,
|
||||
Count = 363,
|
||||
FirstAssignment = 64,
|
||||
LastAssignment = 79,
|
||||
FirstCompoundAssignment = 65,
|
||||
@@ -438,10 +437,10 @@ declare namespace ts {
|
||||
FirstStatement = 242,
|
||||
LastStatement = 258,
|
||||
FirstNode = 165,
|
||||
FirstJSDocNode = 315,
|
||||
LastJSDocNode = 356,
|
||||
FirstJSDocTagNode = 333,
|
||||
LastJSDocTagNode = 356
|
||||
FirstJSDocNode = 314,
|
||||
LastJSDocNode = 355,
|
||||
FirstJSDocTagNode = 332,
|
||||
LastJSDocTagNode = 355
|
||||
}
|
||||
type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
|
||||
type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
|
||||
@@ -1349,21 +1348,14 @@ declare namespace ts {
|
||||
}
|
||||
type JsxOpeningLikeElement = JsxSelfClosingElement | JsxOpeningElement;
|
||||
type JsxAttributeLike = JsxAttribute | JsxSpreadAttribute;
|
||||
type JsxAttributeName = Identifier | JsxNamespacedName;
|
||||
type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess | JsxNamespacedName;
|
||||
type JsxTagNameExpression = Identifier | ThisExpression | JsxTagNamePropertyAccess;
|
||||
interface JsxTagNamePropertyAccess extends PropertyAccessExpression {
|
||||
readonly expression: JsxTagNameExpression;
|
||||
}
|
||||
interface JsxAttributes extends PrimaryExpression, Declaration {
|
||||
readonly properties: NodeArray<JsxAttributeLike>;
|
||||
interface JsxAttributes extends ObjectLiteralExpressionBase<JsxAttributeLike> {
|
||||
readonly kind: SyntaxKind.JsxAttributes;
|
||||
readonly parent: JsxOpeningLikeElement;
|
||||
}
|
||||
interface JsxNamespacedName extends PrimaryExpression {
|
||||
readonly kind: SyntaxKind.JsxNamespacedName;
|
||||
readonly name: Identifier;
|
||||
readonly namespace: Identifier;
|
||||
}
|
||||
interface JsxOpeningElement extends Expression {
|
||||
readonly kind: SyntaxKind.JsxOpeningElement;
|
||||
readonly parent: JsxElement;
|
||||
@@ -1391,16 +1383,15 @@ declare namespace ts {
|
||||
readonly kind: SyntaxKind.JsxClosingFragment;
|
||||
readonly parent: JsxFragment;
|
||||
}
|
||||
interface JsxAttribute extends Declaration {
|
||||
interface JsxAttribute extends ObjectLiteralElement {
|
||||
readonly kind: SyntaxKind.JsxAttribute;
|
||||
readonly parent: JsxAttributes;
|
||||
readonly name: JsxAttributeName;
|
||||
readonly name: Identifier;
|
||||
readonly initializer?: JsxAttributeValue;
|
||||
}
|
||||
type JsxAttributeValue = StringLiteral | JsxExpression | JsxElement | JsxSelfClosingElement | JsxFragment;
|
||||
interface JsxSpreadAttribute extends ObjectLiteralElement {
|
||||
readonly kind: SyntaxKind.JsxSpreadAttribute;
|
||||
readonly name: PropertyName;
|
||||
readonly parent: JsxAttributes;
|
||||
readonly expression: Expression;
|
||||
}
|
||||
@@ -3937,16 +3928,14 @@ declare namespace ts {
|
||||
createJsxOpeningFragment(): JsxOpeningFragment;
|
||||
createJsxJsxClosingFragment(): JsxClosingFragment;
|
||||
updateJsxFragment(node: JsxFragment, openingFragment: JsxOpeningFragment, children: readonly JsxChild[], closingFragment: JsxClosingFragment): JsxFragment;
|
||||
createJsxAttribute(name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
updateJsxAttribute(node: JsxAttribute, name: JsxAttributeName, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
createJsxAttribute(name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
updateJsxAttribute(node: JsxAttribute, name: Identifier, initializer: JsxAttributeValue | undefined): JsxAttribute;
|
||||
createJsxAttributes(properties: readonly JsxAttributeLike[]): JsxAttributes;
|
||||
updateJsxAttributes(node: JsxAttributes, properties: readonly JsxAttributeLike[]): JsxAttributes;
|
||||
createJsxSpreadAttribute(expression: Expression): JsxSpreadAttribute;
|
||||
updateJsxSpreadAttribute(node: JsxSpreadAttribute, expression: Expression): JsxSpreadAttribute;
|
||||
createJsxExpression(dotDotDotToken: DotDotDotToken | undefined, expression: Expression | undefined): JsxExpression;
|
||||
updateJsxExpression(node: JsxExpression, expression: Expression | undefined): JsxExpression;
|
||||
createJsxNamespacedName(namespace: Identifier, name: Identifier): JsxNamespacedName;
|
||||
updateJsxNamespacedName(node: JsxNamespacedName, namespace: Identifier, name: Identifier): JsxNamespacedName;
|
||||
createCaseClause(expression: Expression, statements: readonly Statement[]): CaseClause;
|
||||
updateCaseClause(node: CaseClause, expression: Expression, statements: readonly Statement[]): CaseClause;
|
||||
createDefaultClause(statements: readonly Statement[]): DefaultClause;
|
||||
@@ -5017,7 +5006,6 @@ declare namespace ts {
|
||||
function isJsxAttributes(node: Node): node is JsxAttributes;
|
||||
function isJsxSpreadAttribute(node: Node): node is JsxSpreadAttribute;
|
||||
function isJsxExpression(node: Node): node is JsxExpression;
|
||||
function isJsxNamespacedName(node: Node): node is JsxNamespacedName;
|
||||
function isCaseClause(node: Node): node is CaseClause;
|
||||
function isDefaultClause(node: Node): node is DefaultClause;
|
||||
function isHeritageClause(node: Node): node is HeritageClause;
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
tests/cases/conformance/jsx/checkJsxNamespaceNamesQuestionableForms.tsx(12,2): error TS2304: Cannot find name 'b:c'.
|
||||
tests/cases/conformance/jsx/checkJsxNamespaceNamesQuestionableForms.tsx(12,2): error TS2633: JSX property access expressions cannot include JSX namespace names
|
||||
tests/cases/conformance/jsx/checkJsxNamespaceNamesQuestionableForms.tsx(12,10): error TS2304: Cannot find name 'b:c'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/checkJsxNamespaceNamesQuestionableForms.tsx (1 errors) ====
|
||||
==== tests/cases/conformance/jsx/checkJsxNamespaceNamesQuestionableForms.tsx (3 errors) ====
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
'this:b': any;
|
||||
@@ -15,5 +17,9 @@ tests/cases/conformance/jsx/checkJsxNamespaceNamesQuestionableForms.tsx(12,2): e
|
||||
<a:b></a:b>;
|
||||
<b:c.x></b:c.x>;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'b:c'.
|
||||
~~~
|
||||
!!! error TS2633: JSX property access expressions cannot include JSX namespace names
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'b:c'.
|
||||
<this:b></this:b>;
|
||||
@@ -21,5 +21,11 @@ declare namespace JSX {
|
||||
}
|
||||
|
||||
<a:b></a:b>;
|
||||
>a:b : Symbol(JSX.IntrinsicElements['a:b'], Decl(checkJsxNamespaceNamesQuestionableForms.tsx, 5, 10))
|
||||
>a:b : Symbol(JSX.IntrinsicElements['a:b'], Decl(checkJsxNamespaceNamesQuestionableForms.tsx, 5, 10))
|
||||
|
||||
<b:c.x></b:c.x>;
|
||||
<this:b></this:b>;
|
||||
>this:b : Symbol(JSX.IntrinsicElements['this:b'], Decl(checkJsxNamespaceNamesQuestionableForms.tsx, 1, 33))
|
||||
>this:b : Symbol(JSX.IntrinsicElements['this:b'], Decl(checkJsxNamespaceNamesQuestionableForms.tsx, 1, 33))
|
||||
|
||||
|
||||
@@ -18,26 +18,20 @@ declare namespace JSX {
|
||||
|
||||
<a:b></a:b>;
|
||||
><a:b></a:b> : any
|
||||
>a : any
|
||||
>b : any
|
||||
>a : any
|
||||
>b : any
|
||||
>a:b : any
|
||||
>a:b : any
|
||||
|
||||
<b:c.x></b:c.x>;
|
||||
><b:c.x></b:c.x> : any
|
||||
>b:c.x : any
|
||||
>b : any
|
||||
>c : any
|
||||
>b:c : any
|
||||
>x : any
|
||||
>b:c.x : any
|
||||
>b : any
|
||||
>c : any
|
||||
>b:c : any
|
||||
>x : any
|
||||
|
||||
<this:b></this:b>;
|
||||
><this:b></this:b> : any
|
||||
>this : any
|
||||
>b : any
|
||||
>this : any
|
||||
>b : any
|
||||
>this:b : any
|
||||
>this:b : any
|
||||
|
||||
|
||||
@@ -29,18 +29,13 @@ declare var value;
|
||||
|
||||
<n:a n:v />;
|
||||
><n:a n:v /> : any
|
||||
>n : any
|
||||
>a : any
|
||||
>n:a : any
|
||||
>n:v : true
|
||||
>n : any
|
||||
>v : any
|
||||
|
||||
<a n:foo="bar"> {value} <b><c /></b></a>;
|
||||
><a n:foo="bar"> {value} <b><c /></b></a> : any
|
||||
>a : any
|
||||
>n:foo : string
|
||||
>n : any
|
||||
>foo : any
|
||||
>value : any
|
||||
><b><c /></b> : any
|
||||
>b : any
|
||||
|
||||
@@ -35,7 +35,7 @@ tests/cases/conformance/jsx/17.tsx(1,2): error TS17008: JSX element 'a' has no c
|
||||
tests/cases/conformance/jsx/17.tsx(1,10): error TS1005: '</' expected.
|
||||
tests/cases/conformance/jsx/18.tsx(1,30): error TS2657: JSX expressions must have one parent element.
|
||||
tests/cases/conformance/jsx/19.tsx(1,9): error TS2657: JSX expressions must have one parent element.
|
||||
tests/cases/conformance/jsx/2.tsx(1,5): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/jsx/2.tsx(1,3): error TS1003: Identifier expected.
|
||||
tests/cases/conformance/jsx/20.tsx(1,10): error TS1005: '}' expected.
|
||||
tests/cases/conformance/jsx/20.tsx(1,11): error TS1381: Unexpected token. Did you mean `{'}'}` or `}`?
|
||||
tests/cases/conformance/jsx/21.tsx(1,20): error TS1003: Identifier expected.
|
||||
@@ -74,7 +74,9 @@ tests/cases/conformance/jsx/5.tsx(1,5): error TS1005: '</' expected.
|
||||
tests/cases/conformance/jsx/6.tsx(1,6): error TS17002: Expected corresponding JSX closing tag for 'a'.
|
||||
tests/cases/conformance/jsx/7.tsx(1,13): error TS1002: Unterminated string literal.
|
||||
tests/cases/conformance/jsx/8.tsx(1,8): error TS17002: Expected corresponding JSX closing tag for 'a:b'.
|
||||
tests/cases/conformance/jsx/9.tsx(1,2): error TS2304: Cannot find name 'a:b'.
|
||||
tests/cases/conformance/jsx/9.tsx(1,2): error TS2633: JSX property access expressions cannot include JSX namespace names
|
||||
tests/cases/conformance/jsx/9.tsx(1,10): error TS2304: Cannot find name 'a:b'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/1.tsx (3 errors) ====
|
||||
@@ -89,7 +91,7 @@ tests/cases/conformance/jsx/9.tsx(1,2): error TS2633: JSX property access expres
|
||||
!!! error TS1109: Expression expected.
|
||||
==== tests/cases/conformance/jsx/2.tsx (1 errors) ====
|
||||
<a: />;
|
||||
~
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
==== tests/cases/conformance/jsx/3.tsx (5 errors) ====
|
||||
<:a />;
|
||||
@@ -125,10 +127,14 @@ tests/cases/conformance/jsx/9.tsx(1,2): error TS2633: JSX property access expres
|
||||
<a:b></b>;
|
||||
~
|
||||
!!! error TS17002: Expected corresponding JSX closing tag for 'a:b'.
|
||||
==== tests/cases/conformance/jsx/9.tsx (1 errors) ====
|
||||
==== tests/cases/conformance/jsx/9.tsx (3 errors) ====
|
||||
<a:b.c></a:b.c>;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'a:b'.
|
||||
~~~
|
||||
!!! error TS2633: JSX property access expressions cannot include JSX namespace names
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'a:b'.
|
||||
==== tests/cases/conformance/jsx/10.tsx (6 errors) ====
|
||||
<a.b:c></a.b:c>;
|
||||
~
|
||||
|
||||
@@ -77,7 +77,7 @@ var x = <div>one</div> /* intervening comment */ <div>two</div>;;
|
||||
//// [1.jsx]
|
||||
> ;
|
||||
//// [2.jsx]
|
||||
<a: />;
|
||||
<a />;
|
||||
//// [3.jsx]
|
||||
< ;
|
||||
a / > ;
|
||||
|
||||
@@ -11,7 +11,6 @@ declare var React: any;
|
||||
<a: />;
|
||||
><a: /> : any
|
||||
>a : any
|
||||
> : any
|
||||
|
||||
=== tests/cases/conformance/jsx/3.tsx ===
|
||||
<:a />;
|
||||
@@ -52,20 +51,17 @@ declare var React: any;
|
||||
=== tests/cases/conformance/jsx/8.tsx ===
|
||||
<a:b></b>;
|
||||
><a:b></b> : any
|
||||
>a : any
|
||||
>b : any
|
||||
>a:b : any
|
||||
>b : any
|
||||
|
||||
=== tests/cases/conformance/jsx/9.tsx ===
|
||||
<a:b.c></a:b.c>;
|
||||
><a:b.c></a:b.c> : any
|
||||
>a:b.c : any
|
||||
>a : any
|
||||
>b : any
|
||||
>a:b : any
|
||||
>c : any
|
||||
>a:b.c : any
|
||||
>a : any
|
||||
>b : any
|
||||
>a:b : any
|
||||
>c : any
|
||||
|
||||
=== tests/cases/conformance/jsx/10.tsx ===
|
||||
|
||||
@@ -15,10 +15,11 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(11,32): error TS1003: Identifi
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(11,68): error TS1005: '>' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(11,73): error TS1005: ',' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(11,74): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(21,27): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(21,29): error TS1005: '...' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(21,29): error TS2698: Spread types may only be created from object types.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(21,21): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,26): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,27): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,29): error TS1005: '...' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(22,29): error TS2698: Spread types may only be created from object types.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,21): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,22): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,25): error TS1005: ',' expected.
|
||||
@@ -26,12 +27,10 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,30): error TS2362: The left
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,38): error TS1005: ':' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,41): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(24,42): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,29): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,31): error TS1005: '...' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,31): error TS2698: Spread types may only be created from object types.
|
||||
tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,24): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/jsxNamespacePrefixInName.tsx (31 errors) ====
|
||||
==== tests/cases/compiler/jsxNamespacePrefixInName.tsx (30 errors) ====
|
||||
var justElement1 = <a:element />;
|
||||
var justElement2 = <a:element></a:element>;
|
||||
var justElement3 = <a:element attr={"value"}></a:element>;
|
||||
@@ -87,15 +86,17 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,31): error TS2698: Spread t
|
||||
var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
|
||||
var endOfIdent1 = <a: attr={"value"} />;
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS1005: '...' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2698: Spread types may only be created from object types.
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
|
||||
var beginOfIdent1 = <:a attr={"value"} />;
|
||||
~
|
||||
@@ -113,12 +114,8 @@ tests/cases/compiler/jsxNamespacePrefixInName.tsx(25,31): error TS2698: Spread t
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
var beginOfIdent2 = <a :attr={"value"} />;
|
||||
~
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS1005: '...' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2698: Spread types may only be created from object types.
|
||||
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
var upcaseComponent2 = <Upcase:element />; // Parsed as instrinsic
|
||||
|
||||
@@ -50,9 +50,9 @@ var justAttribute3 = <element a:attr={"value"}>{"text"}</element>;
|
||||
var both1 = <a:element a:attr={"value"}/>;
|
||||
var both2 = <a:element k:attr={"value"}></a:element>;
|
||||
var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
var endOfIdent1 = <a:attr {..."value"}/>;
|
||||
var endOfIdent2 = <a attr:={"value"}/>;
|
||||
var endOfIdent1 = <a attr={"value"}/>;
|
||||
var endOfIdent2 = <a attr {..."value"}/>;
|
||||
var beginOfIdent1 = < , a, attr = { "value": } / > ;
|
||||
var beginOfIdent2 = <a:attr {..."value"}/>;
|
||||
var beginOfIdent2 = <a attr={"value"}/>;
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
var upcaseComponent2 = <Upcase:element />; // Parsed as instrinsic
|
||||
|
||||
@@ -68,10 +68,11 @@ var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
|
||||
var endOfIdent1 = <a: attr={"value"} />;
|
||||
>endOfIdent1 : Symbol(endOfIdent1, Decl(jsxNamespacePrefixInName.tsx, 20, 3))
|
||||
>attr : Symbol(attr, Decl(jsxNamespacePrefixInName.tsx, 20, 21))
|
||||
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
>endOfIdent2 : Symbol(endOfIdent2, Decl(jsxNamespacePrefixInName.tsx, 21, 3))
|
||||
>attr: : Symbol(attr:, Decl(jsxNamespacePrefixInName.tsx, 21, 20))
|
||||
>attr : Symbol(attr, Decl(jsxNamespacePrefixInName.tsx, 21, 20))
|
||||
|
||||
var beginOfIdent1 = <:a attr={"value"} />;
|
||||
>beginOfIdent1 : Symbol(beginOfIdent1, Decl(jsxNamespacePrefixInName.tsx, 23, 3))
|
||||
@@ -81,6 +82,7 @@ var beginOfIdent1 = <:a attr={"value"} />;
|
||||
|
||||
var beginOfIdent2 = <a :attr={"value"} />;
|
||||
>beginOfIdent2 : Symbol(beginOfIdent2, Decl(jsxNamespacePrefixInName.tsx, 24, 3))
|
||||
>attr : Symbol(attr, Decl(jsxNamespacePrefixInName.tsx, 24, 24))
|
||||
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
>upcaseComponent1 : Symbol(upcaseComponent1, Decl(jsxNamespacePrefixInName.tsx, 26, 3))
|
||||
|
||||
@@ -2,62 +2,50 @@
|
||||
var justElement1 = <a:element />;
|
||||
>justElement1 : any
|
||||
><a:element /> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement2 = <a:element></a:element>;
|
||||
>justElement2 : any
|
||||
><a:element></a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement3 = <a:element attr={"value"}></a:element>;
|
||||
>justElement3 : any
|
||||
><a:element attr={"value"}></a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement4 = <a:element>{"text"}</a:element>;
|
||||
>justElement4 : any
|
||||
><a:element>{"text"}</a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement5 = <a:element attr={"value"}>{"text"}</a:element>;
|
||||
>justElement5 : any
|
||||
><a:element attr={"value"}>{"text"}</a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var tooManySeparators1 = <a:ele:ment />;
|
||||
>tooManySeparators1 : any
|
||||
><a:ele:ment /> : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
|
||||
var tooManySeparators2 = <a:ele:ment></a:ele:ment>;
|
||||
>tooManySeparators2 : any
|
||||
><a:ele:ment></a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -66,13 +54,11 @@ var tooManySeparators2 = <a:ele:ment></a:ele:ment>;
|
||||
var tooManySeparators3 = <a:ele:ment attr={"value"}></a:ele:ment>;
|
||||
>tooManySeparators3 : any
|
||||
><a:ele:ment attr={"value"}></a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -81,12 +67,10 @@ var tooManySeparators3 = <a:ele:ment attr={"value"}></a:ele:ment>;
|
||||
var tooManySeparators4 = <a:ele:ment>{"text"}</a:ele:ment>;
|
||||
>tooManySeparators4 : any
|
||||
><a:ele:ment>{"text"}</a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -95,14 +79,12 @@ var tooManySeparators4 = <a:ele:ment>{"text"}</a:ele:ment>;
|
||||
var tooManySeparators5 = <a:ele:ment attr={"value"}>{"text"}</a:ele:ment>;
|
||||
>tooManySeparators5 : any
|
||||
><a:ele:ment attr={"value"}>{"text"}</a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -113,8 +95,6 @@ var justAttribute1 = <element a:attr={"value"} />;
|
||||
><element a:attr={"value"} /> : any
|
||||
>element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
|
||||
var justAttribute2 = <element a:attr={"value"}></element>;
|
||||
@@ -122,8 +102,6 @@ var justAttribute2 = <element a:attr={"value"}></element>;
|
||||
><element a:attr={"value"}></element> : any
|
||||
>element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>element : any
|
||||
|
||||
@@ -132,8 +110,6 @@ var justAttribute3 = <element a:attr={"value"}>{"text"}</element>;
|
||||
><element a:attr={"value"}>{"text"}</element> : any
|
||||
>element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>element : any
|
||||
@@ -141,52 +117,39 @@ var justAttribute3 = <element a:attr={"value"}>{"text"}</element>;
|
||||
var both1 = <a:element a:attr={"value"} />;
|
||||
>both1 : any
|
||||
><a:element a:attr={"value"} /> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
|
||||
var both2 = <a:element k:attr={"value"}></a:element>;
|
||||
>both2 : any
|
||||
><a:element k:attr={"value"}></a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>k:attr : string
|
||||
>k : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
>both3 : any
|
||||
><a:element a:attr={"value"}>{"text"}</a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var endOfIdent1 = <a: attr={"value"} />;
|
||||
>endOfIdent1 : any
|
||||
><a: attr={"value"} /> : any
|
||||
>a : any
|
||||
>attr : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
>endOfIdent2 : any
|
||||
><a attr:={"value"} /> : any
|
||||
>a : any
|
||||
>attr: : string
|
||||
>attr : any
|
||||
> : any
|
||||
>attr : true
|
||||
>"value" : "value"
|
||||
|
||||
var beginOfIdent1 = <:a attr={"value"} />;
|
||||
@@ -208,18 +171,16 @@ var beginOfIdent2 = <a :attr={"value"} />;
|
||||
>beginOfIdent2 : any
|
||||
><a :attr={"value"} /> : any
|
||||
>a : any
|
||||
>attr : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
>upcaseComponent1 : any
|
||||
><ns:Upcase /> : any
|
||||
>ns : any
|
||||
>Upcase : any
|
||||
>ns:Upcase : any
|
||||
|
||||
var upcaseComponent2 = <Upcase:element />; // Parsed as instrinsic
|
||||
>upcaseComponent2 : any
|
||||
><Upcase:element /> : any
|
||||
>Upcase : any
|
||||
>element : any
|
||||
>Upcase:element : any
|
||||
|
||||
|
||||
@@ -15,10 +15,11 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(13,32): error TS1003: Ide
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(13,68): error TS1005: '>' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(13,73): error TS1005: ',' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(13,74): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(23,27): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(23,29): error TS1005: '...' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(23,29): error TS2698: Spread types may only be created from object types.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(23,21): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,26): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,27): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,29): error TS1005: '...' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(24,29): error TS2698: Spread types may only be created from object types.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,21): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,22): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,25): error TS1005: ',' expected.
|
||||
@@ -26,12 +27,10 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,30): error TS2362: The
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,38): error TS1005: ':' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,41): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(26,42): error TS1109: Expression expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,29): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,31): error TS1005: '...' expected.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,31): error TS2698: Spread types may only be created from object types.
|
||||
tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,24): error TS1003: Identifier expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx (31 errors) ====
|
||||
==== tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx (30 errors) ====
|
||||
declare var React: any;
|
||||
|
||||
var justElement1 = <a:element />;
|
||||
@@ -89,15 +88,17 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,31): error TS2698: Spr
|
||||
var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
|
||||
var endOfIdent1 = <a: attr={"value"} />;
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS1005: '...' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2698: Spread types may only be created from object types.
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
|
||||
var beginOfIdent1 = <:a attr={"value"} />;
|
||||
~
|
||||
@@ -115,12 +116,8 @@ tests/cases/compiler/jsxNamespacePrefixInNameReact.tsx(27,31): error TS2698: Spr
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
var beginOfIdent2 = <a :attr={"value"} />;
|
||||
~
|
||||
~
|
||||
!!! error TS1003: Identifier expected.
|
||||
~~~~~~~
|
||||
!!! error TS1005: '...' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2698: Spread types may only be created from object types.
|
||||
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
var upcaseComponent2 = <Upcase:element />; // Parsed as instrinsic
|
||||
|
||||
@@ -63,9 +63,9 @@ var justAttribute3 = React.createElement("element", { "a:attr": "value" }, "text
|
||||
var both1 = React.createElement("a:element", { "a:attr": "value" });
|
||||
var both2 = React.createElement("a:element", { "k:attr": "value" });
|
||||
var both3 = React.createElement("a:element", { "a:attr": "value" }, "text");
|
||||
var endOfIdent1 = React.createElement("a:attr", __assign({}, "value"));
|
||||
var endOfIdent2 = React.createElement("a", { "attr:": "value" });
|
||||
var endOfIdent1 = React.createElement("a", { attr: "value" });
|
||||
var endOfIdent2 = React.createElement("a", __assign({ attr: true }, "value"));
|
||||
var beginOfIdent1 = < , a, attr = { "value": } / > ;
|
||||
var beginOfIdent2 = React.createElement("a:attr", __assign({}, "value"));
|
||||
var beginOfIdent2 = React.createElement("a", { attr: "value" });
|
||||
var upcaseComponent1 = React.createElement("ns:Upcase", null); // Parsed as intrinsic
|
||||
var upcaseComponent2 = React.createElement("Upcase:element", null); // Parsed as instrinsic
|
||||
|
||||
@@ -71,10 +71,11 @@ var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
|
||||
var endOfIdent1 = <a: attr={"value"} />;
|
||||
>endOfIdent1 : Symbol(endOfIdent1, Decl(jsxNamespacePrefixInNameReact.tsx, 22, 3))
|
||||
>attr : Symbol(attr, Decl(jsxNamespacePrefixInNameReact.tsx, 22, 21))
|
||||
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
>endOfIdent2 : Symbol(endOfIdent2, Decl(jsxNamespacePrefixInNameReact.tsx, 23, 3))
|
||||
>attr: : Symbol(attr:, Decl(jsxNamespacePrefixInNameReact.tsx, 23, 20))
|
||||
>attr : Symbol(attr, Decl(jsxNamespacePrefixInNameReact.tsx, 23, 20))
|
||||
|
||||
var beginOfIdent1 = <:a attr={"value"} />;
|
||||
>beginOfIdent1 : Symbol(beginOfIdent1, Decl(jsxNamespacePrefixInNameReact.tsx, 25, 3))
|
||||
@@ -84,6 +85,7 @@ var beginOfIdent1 = <:a attr={"value"} />;
|
||||
|
||||
var beginOfIdent2 = <a :attr={"value"} />;
|
||||
>beginOfIdent2 : Symbol(beginOfIdent2, Decl(jsxNamespacePrefixInNameReact.tsx, 26, 3))
|
||||
>attr : Symbol(attr, Decl(jsxNamespacePrefixInNameReact.tsx, 26, 24))
|
||||
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
>upcaseComponent1 : Symbol(upcaseComponent1, Decl(jsxNamespacePrefixInNameReact.tsx, 28, 3))
|
||||
|
||||
@@ -5,62 +5,50 @@ declare var React: any;
|
||||
var justElement1 = <a:element />;
|
||||
>justElement1 : any
|
||||
><a:element /> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement2 = <a:element></a:element>;
|
||||
>justElement2 : any
|
||||
><a:element></a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement3 = <a:element attr={"value"}></a:element>;
|
||||
>justElement3 : any
|
||||
><a:element attr={"value"}></a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement4 = <a:element>{"text"}</a:element>;
|
||||
>justElement4 : any
|
||||
><a:element>{"text"}</a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var justElement5 = <a:element attr={"value"}>{"text"}</a:element>;
|
||||
>justElement5 : any
|
||||
><a:element attr={"value"}>{"text"}</a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var tooManySeparators1 = <a:ele:ment />;
|
||||
>tooManySeparators1 : any
|
||||
><a:ele:ment /> : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
|
||||
var tooManySeparators2 = <a:ele:ment></a:ele:ment>;
|
||||
>tooManySeparators2 : any
|
||||
><a:ele:ment></a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -69,13 +57,11 @@ var tooManySeparators2 = <a:ele:ment></a:ele:ment>;
|
||||
var tooManySeparators3 = <a:ele:ment attr={"value"}></a:ele:ment>;
|
||||
>tooManySeparators3 : any
|
||||
><a:ele:ment attr={"value"}></a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -84,12 +70,10 @@ var tooManySeparators3 = <a:ele:ment attr={"value"}></a:ele:ment>;
|
||||
var tooManySeparators4 = <a:ele:ment>{"text"}</a:ele:ment>;
|
||||
>tooManySeparators4 : any
|
||||
><a:ele:ment>{"text"}</a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -98,14 +82,12 @@ var tooManySeparators4 = <a:ele:ment>{"text"}</a:ele:ment>;
|
||||
var tooManySeparators5 = <a:ele:ment attr={"value"}>{"text"}</a:ele:ment>;
|
||||
>tooManySeparators5 : any
|
||||
><a:ele:ment attr={"value"}>{"text"}</a:ele : any
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : true
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>ele : any
|
||||
>a:ele : any
|
||||
>ment : any
|
||||
>> : boolean
|
||||
> : any
|
||||
@@ -116,8 +98,6 @@ var justAttribute1 = <element a:attr={"value"} />;
|
||||
><element a:attr={"value"} /> : any
|
||||
>element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
|
||||
var justAttribute2 = <element a:attr={"value"}></element>;
|
||||
@@ -125,8 +105,6 @@ var justAttribute2 = <element a:attr={"value"}></element>;
|
||||
><element a:attr={"value"}></element> : any
|
||||
>element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>element : any
|
||||
|
||||
@@ -135,8 +113,6 @@ var justAttribute3 = <element a:attr={"value"}>{"text"}</element>;
|
||||
><element a:attr={"value"}>{"text"}</element> : any
|
||||
>element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>element : any
|
||||
@@ -144,52 +120,39 @@ var justAttribute3 = <element a:attr={"value"}>{"text"}</element>;
|
||||
var both1 = <a:element a:attr={"value"} />;
|
||||
>both1 : any
|
||||
><a:element a:attr={"value"} /> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
|
||||
var both2 = <a:element k:attr={"value"}></a:element>;
|
||||
>both2 : any
|
||||
><a:element k:attr={"value"}></a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>k:attr : string
|
||||
>k : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var both3 = <a:element a:attr={"value"}>{"text"}</a:element>;
|
||||
>both3 : any
|
||||
><a:element a:attr={"value"}>{"text"}</a:element> : any
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
>a:attr : string
|
||||
>a : any
|
||||
>attr : any
|
||||
>"value" : "value"
|
||||
>"text" : "text"
|
||||
>a : any
|
||||
>element : any
|
||||
>a:element : any
|
||||
|
||||
var endOfIdent1 = <a: attr={"value"} />;
|
||||
>endOfIdent1 : any
|
||||
><a: attr={"value"} /> : any
|
||||
>a : any
|
||||
>attr : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
|
||||
var endOfIdent2 = <a attr:={"value"} />;
|
||||
>endOfIdent2 : any
|
||||
><a attr:={"value"} /> : any
|
||||
>a : any
|
||||
>attr: : string
|
||||
>attr : any
|
||||
> : any
|
||||
>attr : true
|
||||
>"value" : "value"
|
||||
|
||||
var beginOfIdent1 = <:a attr={"value"} />;
|
||||
@@ -211,18 +174,16 @@ var beginOfIdent2 = <a :attr={"value"} />;
|
||||
>beginOfIdent2 : any
|
||||
><a :attr={"value"} /> : any
|
||||
>a : any
|
||||
>attr : any
|
||||
>attr : string
|
||||
>"value" : "value"
|
||||
|
||||
var upcaseComponent1 = <ns:Upcase />; // Parsed as intrinsic
|
||||
>upcaseComponent1 : any
|
||||
><ns:Upcase /> : any
|
||||
>ns : any
|
||||
>Upcase : any
|
||||
>ns:Upcase : any
|
||||
|
||||
var upcaseComponent2 = <Upcase:element />; // Parsed as instrinsic
|
||||
>upcaseComponent2 : any
|
||||
><Upcase:element /> : any
|
||||
>Upcase : any
|
||||
>element : any
|
||||
>Upcase:element : any
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx(15,18): error TS2339: Property 'element' does not exist on type 'JSX.IntrinsicElements'.
|
||||
tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx(16,30): error TS2322: Type '{ attribute: string; }' is not assignable to type '{ "ns:attribute": string; }'.
|
||||
Property 'attribute' does not exist on type '{ "ns:attribute": string; }'. Did you mean '"ns:attribute"'?
|
||||
tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx(17,30): error TS2322: Type '{ "ns:invalid": string; }' is not assignable to type '{ "ns:attribute": string; }'.
|
||||
Property 'ns:invalid' does not exist on type '{ "ns:attribute": string; }'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx (1 errors) ====
|
||||
==== tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx (3 errors) ====
|
||||
declare namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
"ns:element": {
|
||||
@@ -20,5 +24,11 @@ tests/cases/compiler/jsxNamespacePrefixIntrinsics.tsx(15,18): error TS2339: Prop
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2339: Property 'element' does not exist on type 'JSX.IntrinsicElements'.
|
||||
const invalid2 = <ns:element attribute="nope" />;
|
||||
~~~~~~~~~
|
||||
!!! error TS2322: Type '{ attribute: string; }' is not assignable to type '{ "ns:attribute": string; }'.
|
||||
!!! error TS2322: Property 'attribute' does not exist on type '{ "ns:attribute": string; }'. Did you mean '"ns:attribute"'?
|
||||
const invalid3 = <ns:element ns:invalid="nope" />;
|
||||
~~~~~~~~~~
|
||||
!!! error TS2322: Type '{ "ns:invalid": string; }' is not assignable to type '{ "ns:attribute": string; }'.
|
||||
!!! error TS2322: Property 'ns:invalid' does not exist on type '{ "ns:attribute": string; }'.
|
||||
|
||||
@@ -22,22 +22,27 @@ declare namespace JSX {
|
||||
|
||||
const valid = <ns:element ns:attribute="yep" />;
|
||||
>valid : Symbol(valid, Decl(jsxNamespacePrefixIntrinsics.tsx, 10, 5))
|
||||
>ns:element : Symbol(JSX.IntrinsicElements["ns:element"], Decl(jsxNamespacePrefixIntrinsics.tsx, 1, 31))
|
||||
>ns:attribute : Symbol(ns:attribute, Decl(jsxNamespacePrefixIntrinsics.tsx, 10, 25))
|
||||
|
||||
const validUpcase1 = <ns:NamespacedUpcaseAlsoIntrinsic />;
|
||||
>validUpcase1 : Symbol(validUpcase1, Decl(jsxNamespacePrefixIntrinsics.tsx, 11, 5))
|
||||
>ns:NamespacedUpcaseAlsoIntrinsic : Symbol(JSX.IntrinsicElements["ns:NamespacedUpcaseAlsoIntrinsic"], Decl(jsxNamespacePrefixIntrinsics.tsx, 4, 6))
|
||||
|
||||
const validUpcase2 = <NS:NamespacedUpcaseAlsoIntrinsic />;
|
||||
>validUpcase2 : Symbol(validUpcase2, Decl(jsxNamespacePrefixIntrinsics.tsx, 12, 5))
|
||||
>NS:NamespacedUpcaseAlsoIntrinsic : Symbol(JSX.IntrinsicElements["NS:NamespacedUpcaseAlsoIntrinsic"], Decl(jsxNamespacePrefixIntrinsics.tsx, 5, 44))
|
||||
|
||||
const invalid1 = <element />;
|
||||
>invalid1 : Symbol(invalid1, Decl(jsxNamespacePrefixIntrinsics.tsx, 14, 5))
|
||||
|
||||
const invalid2 = <ns:element attribute="nope" />;
|
||||
>invalid2 : Symbol(invalid2, Decl(jsxNamespacePrefixIntrinsics.tsx, 15, 5))
|
||||
>ns:element : Symbol(JSX.IntrinsicElements["ns:element"], Decl(jsxNamespacePrefixIntrinsics.tsx, 1, 31))
|
||||
>attribute : Symbol(attribute, Decl(jsxNamespacePrefixIntrinsics.tsx, 15, 28))
|
||||
|
||||
const invalid3 = <ns:element ns:invalid="nope" />;
|
||||
>invalid3 : Symbol(invalid3, Decl(jsxNamespacePrefixIntrinsics.tsx, 16, 5))
|
||||
>ns:element : Symbol(JSX.IntrinsicElements["ns:element"], Decl(jsxNamespacePrefixIntrinsics.tsx, 1, 31))
|
||||
>ns:invalid : Symbol(ns:invalid, Decl(jsxNamespacePrefixIntrinsics.tsx, 16, 28))
|
||||
|
||||
|
||||
@@ -19,23 +19,18 @@ declare namespace JSX {
|
||||
const valid = <ns:element ns:attribute="yep" />;
|
||||
>valid : any
|
||||
><ns:element ns:attribute="yep" /> : any
|
||||
>ns : any
|
||||
>element : any
|
||||
>ns:element : any
|
||||
>ns:attribute : string
|
||||
>ns : any
|
||||
>attribute : any
|
||||
|
||||
const validUpcase1 = <ns:NamespacedUpcaseAlsoIntrinsic />;
|
||||
>validUpcase1 : any
|
||||
><ns:NamespacedUpcaseAlsoIntrinsic /> : any
|
||||
>ns : any
|
||||
>NamespacedUpcaseAlsoIntrinsic : any
|
||||
>ns:NamespacedUpcaseAlsoIntrinsic : any
|
||||
|
||||
const validUpcase2 = <NS:NamespacedUpcaseAlsoIntrinsic />;
|
||||
>validUpcase2 : any
|
||||
><NS:NamespacedUpcaseAlsoIntrinsic /> : any
|
||||
>NS : any
|
||||
>NamespacedUpcaseAlsoIntrinsic : any
|
||||
>NS:NamespacedUpcaseAlsoIntrinsic : any
|
||||
|
||||
const invalid1 = <element />;
|
||||
>invalid1 : any
|
||||
@@ -45,16 +40,12 @@ const invalid1 = <element />;
|
||||
const invalid2 = <ns:element attribute="nope" />;
|
||||
>invalid2 : any
|
||||
><ns:element attribute="nope" /> : any
|
||||
>ns : any
|
||||
>element : any
|
||||
>ns:element : any
|
||||
>attribute : string
|
||||
|
||||
const invalid3 = <ns:element ns:invalid="nope" />;
|
||||
>invalid3 : any
|
||||
><ns:element ns:invalid="nope" /> : any
|
||||
>ns : any
|
||||
>element : any
|
||||
>ns:element : any
|
||||
>ns:invalid : string
|
||||
>ns : any
|
||||
>invalid : any
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
//// [a.tsx]
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
|
||||
|
||||
//// [a.jsx]
|
||||
var a = <svg:path a:b={1}></svg:path>;
|
||||
var b = <svg:path a:b={1}></svg:path>;
|
||||
@@ -1,9 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
>a : Symbol(a, Decl(a.tsx, 0, 5))
|
||||
>a:b : Symbol(a:b, Decl(a.tsx, 0, 19))
|
||||
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
>b : Symbol(b, Decl(a.tsx, 1, 5))
|
||||
>a:b : Symbol(a:b, Decl(a.tsx, 1, 21))
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
>a : error
|
||||
><svg:path a:b={1}></svg:path> : error
|
||||
>svg : error
|
||||
>path : error
|
||||
>a:b : number
|
||||
>a : error
|
||||
>b : error
|
||||
>1 : 1
|
||||
>svg : error
|
||||
>path : error
|
||||
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
>b : error
|
||||
><svg : path a:b={1}></svg : path> : error
|
||||
>svg : error
|
||||
>path : error
|
||||
>a:b : number
|
||||
>a : error
|
||||
>b : error
|
||||
>1 : 1
|
||||
>svg : error
|
||||
>path : error
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
//// [a.tsx]
|
||||
declare var React: any;
|
||||
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
var a = React.createElement("svg:path", { "a:b": 1 });
|
||||
var b = React.createElement("svg:path", { "a:b": 1 });
|
||||
@@ -1,12 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
declare var React: any;
|
||||
>React : Symbol(React, Decl(a.tsx, 0, 11))
|
||||
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
>a : Symbol(a, Decl(a.tsx, 2, 5))
|
||||
>a:b : Symbol(a:b, Decl(a.tsx, 2, 19))
|
||||
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
>b : Symbol(b, Decl(a.tsx, 3, 5))
|
||||
>a:b : Symbol(a:b, Decl(a.tsx, 3, 21))
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
declare var React: any;
|
||||
>React : any
|
||||
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
>a : error
|
||||
><svg:path a:b={1}></svg:path> : error
|
||||
>svg : error
|
||||
>path : error
|
||||
>a:b : number
|
||||
>a : error
|
||||
>b : error
|
||||
>1 : 1
|
||||
>svg : error
|
||||
>path : error
|
||||
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
>b : error
|
||||
><svg : path a:b={1}></svg : path> : error
|
||||
>svg : error
|
||||
>path : error
|
||||
>a:b : number
|
||||
>a : error
|
||||
>b : error
|
||||
>1 : 1
|
||||
>svg : error
|
||||
>path : error
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
//// [a.tsx]
|
||||
const a = <svg:path></svg:path>;
|
||||
const b = <svg : path></svg : path>;
|
||||
const c = <A:foo></A:foo>;
|
||||
const d = <a:foo></a:foo>;
|
||||
|
||||
|
||||
//// [a.jsx]
|
||||
var a = <svg:path></svg:path>;
|
||||
var b = <svg:path></svg:path>;
|
||||
var c = <A:foo></A:foo>;
|
||||
var d = <a:foo></a:foo>;
|
||||
@@ -1,13 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
const a = <svg:path></svg:path>;
|
||||
>a : Symbol(a, Decl(a.tsx, 0, 5))
|
||||
|
||||
const b = <svg : path></svg : path>;
|
||||
>b : Symbol(b, Decl(a.tsx, 1, 5))
|
||||
|
||||
const c = <A:foo></A:foo>;
|
||||
>c : Symbol(c, Decl(a.tsx, 2, 5))
|
||||
|
||||
const d = <a:foo></a:foo>;
|
||||
>d : Symbol(d, Decl(a.tsx, 3, 5))
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
const a = <svg:path></svg:path>;
|
||||
>a : error
|
||||
><svg:path></svg:path> : error
|
||||
>svg : error
|
||||
>path : error
|
||||
>svg : error
|
||||
>path : error
|
||||
|
||||
const b = <svg : path></svg : path>;
|
||||
>b : error
|
||||
><svg : path></svg : path> : error
|
||||
>svg : error
|
||||
>path : error
|
||||
>svg : error
|
||||
>path : error
|
||||
|
||||
const c = <A:foo></A:foo>;
|
||||
>c : error
|
||||
><A:foo></A:foo> : error
|
||||
>A : error
|
||||
>foo : error
|
||||
>A : error
|
||||
>foo : error
|
||||
|
||||
const d = <a:foo></a:foo>;
|
||||
>d : error
|
||||
><a:foo></a:foo> : error
|
||||
>a : error
|
||||
>foo : error
|
||||
>a : error
|
||||
>foo : error
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
tests/cases/conformance/jsx/a.tsx(5,12): error TS2639: React components cannot include JSX namespace names
|
||||
|
||||
|
||||
==== tests/cases/conformance/jsx/a.tsx (1 errors) ====
|
||||
declare var React: any;
|
||||
|
||||
const a = <svg:path></svg:path>;
|
||||
const b = <svg : path></svg : path>;
|
||||
const c = <A:foo></A:foo>;
|
||||
~~~~~
|
||||
!!! error TS2639: React components cannot include JSX namespace names
|
||||
const d = <a:foo></a:foo>;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
//// [a.tsx]
|
||||
declare var React: any;
|
||||
|
||||
const a = <svg:path></svg:path>;
|
||||
const b = <svg : path></svg : path>;
|
||||
const c = <A:foo></A:foo>;
|
||||
const d = <a:foo></a:foo>;
|
||||
|
||||
|
||||
//// [a.js]
|
||||
var a = React.createElement("svg:path", null);
|
||||
var b = React.createElement("svg:path", null);
|
||||
var c = React.createElement("A:foo", null);
|
||||
var d = React.createElement("a:foo", null);
|
||||
@@ -1,16 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
declare var React: any;
|
||||
>React : Symbol(React, Decl(a.tsx, 0, 11))
|
||||
|
||||
const a = <svg:path></svg:path>;
|
||||
>a : Symbol(a, Decl(a.tsx, 2, 5))
|
||||
|
||||
const b = <svg : path></svg : path>;
|
||||
>b : Symbol(b, Decl(a.tsx, 3, 5))
|
||||
|
||||
const c = <A:foo></A:foo>;
|
||||
>c : Symbol(c, Decl(a.tsx, 4, 5))
|
||||
|
||||
const d = <a:foo></a:foo>;
|
||||
>d : Symbol(d, Decl(a.tsx, 5, 5))
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
=== tests/cases/conformance/jsx/a.tsx ===
|
||||
declare var React: any;
|
||||
>React : any
|
||||
|
||||
const a = <svg:path></svg:path>;
|
||||
>a : any
|
||||
><svg:path></svg:path> : any
|
||||
>svg : any
|
||||
>path : any
|
||||
>svg : any
|
||||
>path : any
|
||||
|
||||
const b = <svg : path></svg : path>;
|
||||
>b : any
|
||||
><svg : path></svg : path> : any
|
||||
>svg : any
|
||||
>path : any
|
||||
>svg : any
|
||||
>path : any
|
||||
|
||||
const c = <A:foo></A:foo>;
|
||||
>c : any
|
||||
><A:foo></A:foo> : any
|
||||
>A : any
|
||||
>foo : any
|
||||
>A : any
|
||||
>foo : any
|
||||
|
||||
const d = <a:foo></a:foo>;
|
||||
>d : any
|
||||
><a:foo></a:foo> : any
|
||||
>a : any
|
||||
>foo : any
|
||||
>a : any
|
||||
>foo : any
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
// @jsx: preserve
|
||||
// @filename: a.tsx
|
||||
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
@@ -1,6 +0,0 @@
|
||||
// @jsx: react
|
||||
// @filename: a.tsx
|
||||
declare var React: any;
|
||||
|
||||
const a = <svg:path a:b={1}></svg:path>;
|
||||
const b = <svg : path a:b={1}></svg : path>;
|
||||
@@ -1,7 +0,0 @@
|
||||
// @jsx: preserve
|
||||
// @filename: a.tsx
|
||||
|
||||
const a = <svg:path></svg:path>;
|
||||
const b = <svg : path></svg : path>;
|
||||
const c = <A:foo></A:foo>;
|
||||
const d = <a:foo></a:foo>;
|
||||
@@ -1,8 +0,0 @@
|
||||
// @jsx: react
|
||||
// @filename: a.tsx
|
||||
declare var React: any;
|
||||
|
||||
const a = <svg:path></svg:path>;
|
||||
const b = <svg : path></svg : path>;
|
||||
const c = <A:foo></A:foo>;
|
||||
const d = <a:foo></a:foo>;
|
||||
Reference in New Issue
Block a user