You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are facing an issue, which is that there is a name collision between another PhoneNumber type in our project, and the PhoneNumber provided by PhoneNumberKit. For reasons that are not very interesting to go into here, it is not a possible solution to typealias the other PhoneNumber type.
I would like to fix this issue by typealiasing PhoneNumberKit's PhoneNumber, doing something like this:
The reason this is not possible, is that PhoneNumberKit exports a type called PhoneNumberKit, which means that we cannot namespace any imports from PhoneNumberKit; the compiler thinks we are referring to the type, and not the module.
To fix this, I would like to open a PR that renames the PhoneNumberKit type exported --- suggestions for a new name are welcome.
The text was updated successfully, but these errors were encountered:
Because of the lack of a proper name and it would be a breaking change, I still need to think I little bit more about it.
However you can fix it by creating a new file, let's call it PhoneNumberKit+Alias.swift, and adding the following code:
Because of the lack of a proper name and it would be a breaking change, I still need to think I little bit more about it. However you can fix it by creating a new file, let's call it PhoneNumberKit+Alias.swift, and adding the following code:
Hello, and thanks for your work on this project!
We are facing an issue, which is that there is a name collision between another
PhoneNumber
type in our project, and thePhoneNumber
provided by PhoneNumberKit. For reasons that are not very interesting to go into here, it is not a possible solution to typealias the otherPhoneNumber
type.I would like to fix this issue by typealiasing PhoneNumberKit's
PhoneNumber
, doing something like this:The reason this is not possible, is that PhoneNumberKit exports a type called
PhoneNumberKit
, which means that we cannot namespace any imports from PhoneNumberKit; the compiler thinks we are referring to the type, and not the module.To fix this, I would like to open a PR that renames the
PhoneNumberKit
type exported --- suggestions for a new name are welcome.The text was updated successfully, but these errors were encountered: