Skip to content

Commit

Permalink
it's helpful to write working code
Browse files Browse the repository at this point in the history
  • Loading branch information
chandlerprall committed Jul 1, 2021
1 parent 967f542 commit c07b87d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/dtsgenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ generator.then(() => {
function buildEuiTokensObject() {
// reduce over the tokens list as a few of the tokens are used multiple times and must be
// filtered down to a list
const i18ndefs = require('../i18ntokens.json').reduce(
({ definitions, tokens }, def) => {
if (tokens.has(def.token)) {
const { i18ndefs } = require('../i18ntokens.json').reduce(
({ i18ndefs, tokens }, def) => {
if (!tokens.has(def.token)) {
tokens.add(def.token);
definitions.push(def);
i18ndefs.push(def);
}
return definitions;
return { i18ndefs, tokens };
},
{ definitions: [], tokens: new Set() }
{ i18ndefs: [], tokens: new Set() }
);
return `
declare module '@elastic/eui' {
Expand Down

0 comments on commit c07b87d

Please sign in to comment.