Skip to content

Commit

Permalink
update default template for *.d.ts using interface instead of type li…
Browse files Browse the repository at this point in the history
…teral
  • Loading branch information
TasukuUno committed Jul 10, 2018
1 parent 9f803ab commit b65fa2f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/generateType.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ function template(classNames, options) {
}[indentType]);

let result = `
type Style = {
interface Style {
${classNames.map((className) => ` ${className}: string;`).join('\n')}
}
declare namespace ClassNames {
type DictionaryValue = boolean | undefined | null;
type Dictionary = {
interface Dictionary {
[id: string]: DictionaryValue;
}
type Value = string | Dictionary | Values | null | undefined;
Expand All @@ -87,7 +87,7 @@ declare namespace ClassNamesBind {
type DictionaryValue = boolean | undefined | null;
type Dictionary = {
[key in Names]?: DictionaryValue;
}
};
type Value = Names | Dictionary | Values | null | undefined;
interface Values extends Array<Value> {}
type Fn = (...classes: Value[]) => string;
Expand Down

0 comments on commit b65fa2f

Please sign in to comment.