Skip to content
This repository has been archived by the owner on Sep 14, 2019. It is now read-only.

Add TypeScript typings #33

Merged
merged 3 commits into from
Jun 24, 2019
Merged

Add TypeScript typings #33

merged 3 commits into from
Jun 24, 2019

Conversation

TimonVS
Copy link
Contributor

@TimonVS TimonVS commented Jun 24, 2019

I had to update npm-run-all because I couldn't install because the specific version of flatmap-stream it used has been unpublished due to malware: mysticatea/npm-run-all#155.

In any case, this PR adds typings to the package, I also had to install Probot as a dev dependency to be able to include it in the typings. I'm not sure if that's the correct way but I'd be glad to receive feedback :)

Fixes: #19

export default function getConfig<T>(
context: Context,
fileName: string,
defaultConfig?: T,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm unsure if this should be T or Partial<T>

@gr2m
Copy link
Contributor

gr2m commented Jun 24, 2019

Thanks @TimonVS, that looks like a great start!

We don’t use yarn in the other probot project. Can you please remove it from your pull request? We could add it to .gitignore to prevent it be added in future.

We don’t mind adding package-lock.json though.

@TimonVS
Copy link
Contributor Author

TimonVS commented Jun 24, 2019

Of course, I must be tired because I assumed the yarn.lock was already there 😅.

Copy link
Contributor

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

I’d say let’s ship it and then iterate as we see room for improvement or further discussion. Thanks @TimonVS

@gr2m gr2m merged commit d17956f into probot:master Jun 24, 2019
@probotbot
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add typescript typings
3 participants