Skip to content

Commit

Permalink
[typscript] Adjust icon typings to change introduces in #8366 (#8529)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebald authored and oliviertassinari committed Oct 4, 2017
1 parent 8be0c2d commit da564eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/material-ui-icons/create-typings.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ function normalizeFileName(file) {
return path.parse(file).name;
}

function createTypeDefinition(name) {
return `import SvgIcon from 'material-ui/SvgIcon';
export default class ${name} extends SvgIcon {}`;
function createTypeDefinition() {
// eslint-disable-next-line quotes
return `export { default } from 'material-ui/SvgIcon';`;
}

function createIconTyping(file) {
const name = normalizeFileName(file);
return outputFile(path.resolve(TARGET_DIR, `${name}.d.ts`), createTypeDefinition(name), {
return outputFile(path.resolve(TARGET_DIR, `${name}.d.ts`), createTypeDefinition(), {
encoding: 'utf8',
});
}
Expand Down

0 comments on commit da564eb

Please sign in to comment.