Add TypeScript comments in typescript declarations#37
Conversation
|
In order to parse doc information from XML files, a dependecy to |
8f9f07a to
74da208
Compare
6b128e2 to
7ddafe5
Compare
7ddafe5 to
f1a40a9
Compare
There was a problem hiding this comment.
I think it would be best to not try to compute the docset path inside the metadata generator. I think it would be better to do it in the python script that drives the metadata generator, because it can access the EFFECTIVE_PLATFORM_NAME build setting in Xcode in order to find the docset for the right platform.
There was a problem hiding this comment.
@fealebenpae This makes sense but I didn't manage to find a platform specific docset package. Also, Xcode doesn't give you the option to choose between iOS doc for device and iOS doc for emulator. Also, the name of the docset package doesn't hint a specific platform, so I came to conclusion that the docset package is the same for device and simulator. Am I missing something?
There was a problem hiding this comment.
I rather meant that we should not hardcode to the iOS docset so as to be able to support tvOS, watchOS and macosx down the line. Maybe EFFECTIVE_PLATFORM_NAME is not the correct build setting because of the simulator thing and in that case we should find a way to correctly infer the docset we need.
|
Looks good to me. |
|
We should note in the docs, that in order for this to work, the user should download the iOS documentation from Xcode first. |
There was a problem hiding this comment.
You can wrap all these helper functions in an anonymous namespace, if you'd like.
37a6384 to
79ecb41
Compare
There was a problem hiding this comment.
Maybe we should free the context, too?
|
I agree with the comments ... will fix the issues ;) |
79ecb41 to
1f68db9
Compare
|
Added documentation: https://github.com/NativeScript/ios-runtime-docs/pull/49 |
ad0dc0a to
145421a
Compare
|
Looks good to me too |
…tion and transforming it to TypeScript comments.
145421a to
e0f2d12
Compare
Add TypeScript comments in typescript declarations
|
|
||
| _buffer << std::endl << "\tdeclare class " << meta->jsName << getTypeParametersStringOrEmpty(clang::cast<clang::ObjCInterfaceDecl>(meta->declaration)); | ||
| _buffer << std::endl | ||
| << _docSet.getCommentFor(meta).toString("\t") << "\tdeclare class " << getTypeParametersStringOrEmpty(clang::cast<clang::ObjCInterfaceDecl>(meta->declaration)); |
There was a problem hiding this comment.
I think that the class name is missing here 😄
Here is the declaration for NSObject:
declare class implements NSObjectProtocol {
// ...
}There was a problem hiding this comment.
Sure, it's missing 😄 ... i have missed that one when merging ;)
NativeScript/ios-jsc#353