Skip to content

For/takepepe#11

Open
kahirokunn wants to merge 4 commits into
masterfrom
for/takepepe
Open

For/takepepe#11
kahirokunn wants to merge 4 commits into
masterfrom
for/takepepe

Conversation

@kahirokunn

@kahirokunn kahirokunn commented Dec 5, 2018

Copy link
Copy Markdown
Owner

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

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

@reg-suit

reg-suit Bot commented Dec 5, 2018

Copy link
Copy Markdown

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

You can check the report out here.

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

@takefumi-yoshii takefumi-yoshii Dec 5, 2018

Copy link
Copy Markdown

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
Copy Markdown
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