Rename classname attr; update bench results; mention decoding to U+FFFD
This commit is contained in:
parent
f8b0bbe3e0
commit
4eeb70639a
10 changed files with 92 additions and 92 deletions
|
|
@ -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];
|
||||
|
|
|
|||
|
|
@ -63,12 +63,12 @@
|
|||
"ins",
|
||||
"quote"
|
||||
],
|
||||
"class": [
|
||||
""
|
||||
],
|
||||
"classid": [
|
||||
"object"
|
||||
],
|
||||
"classname": [
|
||||
""
|
||||
],
|
||||
"color": [
|
||||
""
|
||||
],
|
||||
|
|
|
|||
Reference in a new issue