Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
return node;
}
function typeName(name) {
return toCamelCase(name) + 'T';
}
function propertyName(name) {
return toCamelCase(name);
}
let statementList = [];
let propList = [];
for (let key in cssData.properties) {
let prop = parseSyntax(cssData.properties[key]);
key = toCamelCase(key);
statementList.push(
t.exportNamedDeclaration(
t.typeAlias(
t.identifier(propertyName(key)),
null,
normalizeType(buildType(prop, key)),
),
[],
t.stringLiteral('type'),
),
);
let typeProp = t.objectTypeProperty(t.identifier(key), t.identifier(propertyName(key)));
typeProp.optional = true;
propList.push(typeProp);
return node;
}
function typeName(name) {
return toCamelCase(name) + 'T';
}
function propertyName(name) {
return toCamelCase(name);
}
let statementList = [];
let propList = [];
for (let key in cssData.properties) {
let prop = parseSyntax(cssData.properties[key]);
key = toCamelCase(key);
statementList.push(
t.exportNamedDeclaration(
t.typeAlias(
t.identifier(propertyName(key)),
null,
normalizeType(buildType(prop, key)),
),
[],
t.stringLiteral('type'),
),
);
let typeProp = t.objectTypeProperty(t.identifier(key), t.identifier(propertyName(key)));
typeProp.optional = true;
propList.push(typeProp);
}