Open inomn opened 1 year ago
I'm trying override the ETA
-templates but it has no effects. For example in type inheritance
hi @js2me, what do you think about it?
I'm trying override the
ETA
-templates but it has no effects. For example in type inheritance
@chiralium The template to override is data-contracts.ejs
const dataContractTemplates = {
enum: (contract) => {
return `enum ${contract.name} {\r\n${contract.content} \r\n }`;
},
interface: (contract) => {
/**
* Add your prefix/suffix here
*/
return `interface I${contract.name} {\r\n${contract.content}}`;
},
type: (contract) => {
return `type ${contract.name} = ${contract.content}`;
},
}
I'm trying override the
ETA
-templates but it has no effects. For example in type inheritance@chiralium The template to override is
data-contracts.ejs
const dataContractTemplates = { enum: (contract) => { return `enum ${contract.name} {\r\n${contract.content} \r\n }`; }, interface: (contract) => { /** * Add your prefix/suffix here */ return `interface I${contract.name} {\r\n${contract.content}}`; }, type: (contract) => { return `type ${contract.name} = ${contract.content}`; }, }
This template override the interface definition, but not the extends
part where super-interface has no prefix
any news?
Hi! First of all thanks for this project!
Currently, there are several props for prefix\suffix settings:
But the one is missing is
interfacePrefix
(andinterfaceSuffix
).Ideally, I want to have a
"T"
prefix for my types, and"I"
for my interfaces, as far as I understand, currently it's impossible, andtypePrefix
will be applied to both types and interfaces.Thanks!