Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For/takepepe #11

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

For/takepepe #11

wants to merge 4 commits into from

Conversation

kahirokunn
Copy link
Owner

@kahirokunn kahirokunn commented Dec 5, 2018

c8ba44c
こんな感じにpringのinitializeだけ型を変更したいです。しかしこの書き方だとpring moduleには他にも沢山のメソッドとかエクスポートしてるんですが、それらがいない子になってしまう。

ゴール: initializeだけ型を変えるのに成功する

@reg-suit
Copy link

reg-suit bot commented Dec 5, 2018

✨✨ That's perfect, there is no visual difference! ✨✨

You can check the report out here.

@@ -0,0 +1,4 @@
declare module 'pring' {
Copy link

@takefumi-yoshii takefumi-yoshii Dec 5, 2018

Choose a reason for hiding this comment

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

ファイル先頭に import * as Pring from 'pring' を追加すれば、既存定義を壊さず重複していないメソッドを生やすことは出来ますね。ただ、initialize がオーバーロード出来ずで、ぐぐっても解決策なさそうで積みました

Copy link
Owner Author

Choose a reason for hiding this comment

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

へーーーーーーーーー!
d.tdはモジュールテンプレートファイル?っていうんですかね!
モジュールテンプレートファイルの先頭でimportすると拡張って感じですかね!

@kahirokunn kahirokunn force-pushed the master branch 3 times, most recently from ec7e690 to 5cae5f6 Compare December 28, 2018 09:38
@kahirokunn kahirokunn force-pushed the master branch 10 times, most recently from 2c7a41b to 1c84825 Compare February 2, 2019 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants