-
Notifications
You must be signed in to change notification settings - Fork 899
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
imp: Migrate platform-ios
to TypeScript
#620
Conversation
platform-ios
to TypesScriptplatform-ios
to TypeScript
@@ -18,18 +16,21 @@ describe('pods::isInstalled', () => { | |||
it('returns false if pod is missing', () => { | |||
const project = {podfile: path.join(PODFILES_PATH, 'PodfileSimple')}; | |||
const podspecName = {podspecPath: '/path/NotExisting'}; | |||
// @ts-ignore FIXME: Improve types |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was the issue with these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isInstalled
function is not written correctly. We are passing whole big objects to the function, but not all properties are used. I've added ts-ignore
in the test to prevent adding unused mock data.
export default function removeFromStaticLibraries( | ||
project: any, | ||
path: string, | ||
opts: {[key: string]: any}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will you do a follow up PR to fix all instance of any
? There's an awful lot of them…
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the plan. We have so many instances of any
because library that we rely on - https://www.npmjs.com/package/xcode
- has no typings. I want to write them in the future and make this module better. For now, this PR is big enough and didn't want to include the next big thing.
@tido64 I resolved all the comments that were fixed. There is still plenty of work to do. We have to add types to the |
f01b7b3
to
63fb47c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good already. Let's tackle any
s in a followup. Feel free to ask community for some help :)
Summary:
This PR includes moving the whole
platform-ios
module to Typescript. There were a lot of issues while moving this module because most of it was untyped and the main library that we rely on (xcode
) is untyped. Also, there is a lot of explicit casting toany
type, empty stub definitions forxcode
module and plenty of@ts-ignore
.Changes:
.js
to.ts
platform-ios
cli-types
TODO:
- [ ] - Fix as many types issues as possible- [ ] - Improve typings forxcode
^ Since those will take much more effort and time to make, I think we can make issues for them after we merge this PR.
Test Plan:
👍- All the check are passing.