Skip to content

Conversation

@sebald
Copy link
Contributor

@sebald sebald commented Aug 23, 2017

This patch refactors all TS typings to be modules, instead of ambient modules. Meaning, there is no longer a single typings file, but rather every source files has a corresponding .d.ts file.

Closes #7853


  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

@sebald
Copy link
Contributor Author

sebald commented Aug 23, 2017

@oliviertassinari This is more of a J4I
This is what it will look like. All right? :)

* v1-beta: (23 commits)
  [docs] Fix missing props in css-in-js examples (#7867)
  [docs] Small fixes after the next.js refactorization (#7851)
  [docs] Fix release script v2
  [docs] Fix release script
  v1.0.0-beta.6
  [CHANGELOG] Prepare v1.0.0-beta.6
  [docs] Some last improvement before the release (#7847)
  [docs] Show inherited components (#7846)
  [docs] Add a team page (#7842)
  [docs] Add a ROADMAP page (#7840)
  [TextField] Fix placeholder issue (#7838)
  [core] Better usage of the CI 🚀 (#7833)
  [RadioGroup] Rename selectedValue to value (#7832)
  [docs] Use next.js (#7759)
  [core] Update some dependencies (#7831)
  [icons] Release v1.0.0-beta.5
  [icons] Fix release
  [docs] Advanced table (#7824)
  [icons] Automate release process (#7823)
  [core] Fix size-limit warning (#7822)
  ...

# Conflicts:
#	docs/src/pages/demos/badges/badges.md
#	docs/src/pages/demos/cards/cards.md
#	docs/src/pages/demos/selection-controls/selection-controls.md
#	docs/src/pages/demos/stepper/stepper.md
#	pages/api/app-bar.md
#	pages/api/avatar.md
#	pages/api/badge.md
#	pages/api/bottom-navigation-button.md
#	pages/api/bottom-navigation.md
#	pages/api/button-base.md
#	pages/api/button.md
#	pages/api/card-actions.md
#	pages/api/card-content.md
#	pages/api/card-header.md
#	pages/api/card-media.md
#	pages/api/card.md
#	pages/api/checkbox.md
#	pages/api/chip.md
#	pages/api/circular-progress.md
#	pages/api/collapse.md
#	pages/api/dialog-actions.md
#	pages/api/dialog-content.md
#	pages/api/dialog-title.md
#	pages/api/dialog.md
#	pages/api/divider.md
#	pages/api/drawer.md
#	pages/api/fade.md
#	pages/api/form-control-label.md
#	pages/api/form-control.md
#	pages/api/form-group.md
#	pages/api/form-helper-text.md
#	pages/api/form-label.md
#	pages/api/grid-list-tile-bar.md
#	pages/api/grid-list-tile.md
#	pages/api/grid-list.md
#	pages/api/grid.md
#	pages/api/grow.md
#	pages/api/hidden.md
#	pages/api/icon-button.md
#	pages/api/icon.md
#	pages/api/input-label.md
#	pages/api/input.md
#	pages/api/linear-progress.md
#	pages/api/list-item-avatar.md
#	pages/api/list-item-icon.md
#	pages/api/list-item-secondary-action.md
#	pages/api/list-item-text.md
#	pages/api/list-item.md
#	pages/api/list-subheader.md
#	pages/api/list.md
#	pages/api/menu-item.md
#	pages/api/menu-list.md
#	pages/api/menu.md
#	pages/api/mobile-stepper.md
#	pages/api/mui-theme-provider.md
#	pages/api/paper.md
#	pages/api/radio-group.md
#	pages/api/radio.md
#	pages/api/snackbar-content.md
#	pages/api/snackbar.md
#	pages/api/svg-icon.md
#	pages/api/switch.md
#	pages/api/tab.md
#	pages/api/table-body.md
#	pages/api/table-cell.md
#	pages/api/table-head.md
#	pages/api/table-row.md
#	pages/api/table-sort-label.md
#	pages/api/table.md
#	pages/api/tabs.md
#	pages/api/text-field.md
#	pages/api/toolbar.md
#	pages/api/typography.md
#	typings/index.d.ts
@oliviertassinari
Copy link
Member

Might want to rebase on top of v1-beta. You have 25 commits right now.

@sebald
Copy link
Contributor Author

sebald commented Aug 23, 2017

Hm, isn't the PR squashed anyway?

}).then(() => console.log(`Copied ${file} to ${buildPath}`));
}

function copyTypings(from, to) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oliviertassinari I had to update this script, because the .d.ts were not picked up while building :(

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, the .js are copied by Babel.

@sebald
Copy link
Contributor Author

sebald commented Aug 23, 2017

@oliviertassinari So running builds for material-ui and material-ui-icons locally, looks good from my end. Could you maybe verfiy, so there is no "works on my machine" bug? :)

@oliviertassinari
Copy link
Member

@sebald Will try that out before merging 👍

@oliviertassinari oliviertassinari merged commit 8369729 into v1-beta Aug 23, 2017
@oliviertassinari oliviertassinari deleted the refactor-typings-to-modules branch August 23, 2017 18:04
@oliviertassinari oliviertassinari changed the title Refactor typings to modules [TypeScript] Refactor typings to modules Aug 23, 2017
Taldrain pushed a commit to Taldrain/material-ui that referenced this pull request Aug 24, 2017
* [typescript] Add test for style overrides.

* [typescript] Refactor typings to modules

...instead of ambient modules.

* renamed the styleSheet argument in withStyles to styles (mui#7819)

* [typescript] Create typings for TS when building. (mui#7820)

* [core] Fix size-limit warning (mui#7822)

* [icons] Automate release process (mui#7823)

* [docs] Advanced table (mui#7824)

* [icons] Fix release

* [icons] Release v1.0.0-beta.5

* [core] Update some dependencies (mui#7831)

* [icons] Update the dependencies

* [core] Update some dependencies

* [docs] Use next.js (mui#7759)

* [RadioGroup] Rename selectedValue to value (mui#7832)

* [core] Better usage of the CI 🚀 (mui#7833)

* [TextField] Fix placeholder issue (mui#7838)

* [docs] Add a ROADMAP page (mui#7840)

* [docs] Add a team page (mui#7842)

* [docs] Show inherited components (mui#7846)

* [docs] Some last improvement before the release (mui#7847)

* [CHANGELOG] Prepare v1.0.0-beta.6

* v1.0.0-beta.6

* [docs] Fix release script

* [docs] Fix release script v2

* [docs] Small fixes after the next.js refactorization (mui#7851)

* [docs] Fix missing props in css-in-js examples (mui#7867)

* [docs] Fix missing props in css-in-js examples

`this.classes.root` wouldn't work - `this.props.classes.root' would.

* Update css-in-js.md

* [typescript] Fix tests.

* [build] Copy .d.ts files to build folder.

* [typescript] Create module typings for icons.

* [typescript] Lint.
@sebald sebald mentioned this pull request Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants