murat-mehmet commented on issue #64:
URL:
https://github.com/apache/cordova-node-xcode/issues/64#issuecomment-1731039588
For anyone in need of this, this is the best solution so far:
```
npm install xcode
npx dts-gen -m xcode
```
This will generate a xcode.d.ts file in the project root, move it into the
src folder.
1. Open `xcode.d.ts`, rename `export class project` to `export class
XcodeProject`
2. Add `export function project(filePath: string): XcodeProject;`
3. Wrap everything into `declare module 'xcode'`
The final file should look like this:
```
declare module 'xcode' {
export function project(filePath: string): XcodeProjectType;
export class XcodeProjectType {
constructor(filename: any);
addBuildPhase(
filePathsArray: any,
buildPhaseType: any,
comment: any,
target: any,
optionsOrFolderType?: any,
subfolderPath?: any
): any;
...
```
Everything is declared as any but at least function and parameter names are
generated and you can modify types for the functions you need easily.
Maybe a hero sets types for all methods and shares with us.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]