Rename classname attr; update bench results; mention decoding to U+FFFD

This commit is contained in:
Wilson Lin 2020-01-15 22:57:47 +11:00
commit 4eeb70639a
10 changed files with 92 additions and 92 deletions

View file

@ -27,6 +27,10 @@ const attrInterfaceToTagName = {
'anchor': 'a',
};
const attrNameNormalised = {
'classname': 'class',
};
const reactSpecificAttributes = [
'defaultChecked', 'defaultValue', 'suppressContentEditableWarning', 'suppressHydrationWarning',
];
@ -46,7 +50,7 @@ const processReactTypeDeclarations = async (source) => {
if (!['all', 'webview'].includes(tagName)) {
for (const n of node.members.filter(n => n.kind === ts.SyntaxKind.PropertySignature)) {
// TODO Is escapedText the API for getting name?
const attr = n.name.escapedText.toLowerCase();
const attr = [n.name.escapedText.toLowerCase()].map(n => attrNameNormalised[n] || n)[0];
const types = n.type.kind === ts.SyntaxKind.UnionType
? n.type.types.map(t => t.kind)
: [n.type.kind];

View file

@ -63,12 +63,12 @@
"ins",
"quote"
],
"class": [
""
],
"classid": [
"object"
],
"classname": [
""
],
"color": [
""
],