diff --git a/lib/definitions/nativescript-dev-xcode.d.ts b/lib/definitions/nativescript-dev-xcode.d.ts new file mode 100644 index 0000000000..861f14b309 --- /dev/null +++ b/lib/definitions/nativescript-dev-xcode.d.ts @@ -0,0 +1,62 @@ +declare module "nativescript-dev-xcode" { + interface Options { + [key: string]: any; + + customFramework?: boolean; + embed?: boolean; + relativePath?: string; + } + + class project { + constructor(filename: string); + + parse(callback: () => void): void; + parseSync(): void; + + writeSync(options: any): string; + + addFramework(filepath: string, options?: Options): void; + removeFramework(filePath: string, options?: Options): void; + + addPbxGroup(filePathsArray: any[], name: string, path: string, sourceTree: string): void; + + removePbxGroup(groupName: string, path: string): void; + + addToHeaderSearchPaths(options?: Options): void; + removeFromHeaderSearchPaths(options?: Options): void; + updateBuildProperty(key: string, value: any): void; + + pbxXCBuildConfigurationSection(): any; + + addTarget(targetName: string, targetType: string, targetPath?: string, parentTarget?: string): target; + addBuildPhase(filePathsArray: string[], + buildPhaseType: string, + comment: string, + target?: string, + optionsOrFolderType?: Object|string, + subfolderPath?: string + ): any; + addToBuildSettings(buildSetting: string, value: any, targetUuid?: string): void; + addPbxGroup( + filePathsArray: string[], + name: string, + path: string, + sourceTree: string, + opt: {filesRelativeToProject?: boolean, target?: string, uuid?: string, isMain?: boolean } + ): group; + addBuildProperty(prop: string, value: any, build_name?: string, productName?: string): void; + addToHeaderSearchPaths(file: string|Object, productName?: string): void; + removeTargetsByProductType(targetType: string): void; + getFirstTarget(): {uuid: string}; + } + + class target { + uuid: string; + pbxNativeTarget: {productName: string} + } + + class group { + uuid: string; + pbxGroup: Object; + } +} \ No newline at end of file diff --git a/lib/definitions/xcode.d.ts b/lib/definitions/xcode.d.ts index 861f14b309..df7acee309 100644 --- a/lib/definitions/xcode.d.ts +++ b/lib/definitions/xcode.d.ts @@ -1,62 +1,12 @@ -declare module "nativescript-dev-xcode" { - interface Options { - [key: string]: any; +/// - customFramework?: boolean; - embed?: boolean; - relativePath?: string; - } - - class project { - constructor(filename: string); - - parse(callback: () => void): void; - parseSync(): void; - - writeSync(options: any): string; - - addFramework(filepath: string, options?: Options): void; - removeFramework(filePath: string, options?: Options): void; - - addPbxGroup(filePathsArray: any[], name: string, path: string, sourceTree: string): void; - - removePbxGroup(groupName: string, path: string): void; - - addToHeaderSearchPaths(options?: Options): void; - removeFromHeaderSearchPaths(options?: Options): void; - updateBuildProperty(key: string, value: any): void; - - pbxXCBuildConfigurationSection(): any; - - addTarget(targetName: string, targetType: string, targetPath?: string, parentTarget?: string): target; - addBuildPhase(filePathsArray: string[], - buildPhaseType: string, - comment: string, - target?: string, - optionsOrFolderType?: Object|string, - subfolderPath?: string - ): any; - addToBuildSettings(buildSetting: string, value: any, targetUuid?: string): void; - addPbxGroup( - filePathsArray: string[], - name: string, - path: string, - sourceTree: string, - opt: {filesRelativeToProject?: boolean, target?: string, uuid?: string, isMain?: boolean } - ): group; - addBuildProperty(prop: string, value: any, build_name?: string, productName?: string): void; - addToHeaderSearchPaths(file: string|Object, productName?: string): void; - removeTargetsByProductType(targetType: string): void; - getFirstTarget(): {uuid: string}; - } - - class target { - uuid: string; - pbxNativeTarget: {productName: string} - } +import * as xcode from "nativescript-dev-xcode"; - class group { - uuid: string; - pbxGroup: Object; +declare global { + type IXcode = typeof xcode; + export namespace IXcode { + export type target = xcode.target; + export type project = xcode.project; + export interface Options extends xcode.Options {} // tslint:disable-line } } \ No newline at end of file diff --git a/lib/node/xcode.ts b/lib/node/xcode.ts index b2d193c56f..f4ca1c4efe 100644 --- a/lib/node/xcode.ts +++ b/lib/node/xcode.ts @@ -1,14 +1,5 @@ import * as xcode from "nativescript-dev-xcode"; -declare global { - type IXcode = typeof xcode; - export namespace IXcode { - export type target = xcode.target; - export type project = xcode.project; - export interface Options extends xcode.Options {} // tslint:disable-line - } -} - export { xcode }; $injector.register("xcode", xcode);