diff --git a/packages/titanium-docgen/generators/typescript_generator.js b/packages/titanium-docgen/generators/typescript_generator.js index 1d4234b..acd745c 100644 --- a/packages/titanium-docgen/generators/typescript_generator.js +++ b/packages/titanium-docgen/generators/typescript_generator.js @@ -361,21 +361,13 @@ class GlobalTemplateWriter { writeHeader() { const versionSplit = this.version.split('.'); const majorMinor = `${versionSplit[0]}.${versionSplit[1]}`; - this.output += `// Type definitions for non-npm package Titanium ${majorMinor}\n`; - this.output += '// Project: https://github.com/appcelerator/titanium_mobile\n'; - this.output += '// Definitions by: Axway Appcelerator \n'; - this.output += '// Jan Vennemann \n'; - this.output += '// Mathias Lorenzen \n'; - this.output += '// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped\n'; - this.output += '// TypeScript Version: 3.0\n'; - this.output += '\n'; this.output += '// Base definitions that can\'t be generated yet\n'; this.output += '/// \n'; this.output += '\n'; this.output += 'type _Omit = Pick>;\n'; this.output += 'type FunctionPropertyNames = {\n'; this.output += ' // tslint:disable-next-line:ban-types\n'; - this.output += ' [K in keyof T]: T[K] extends Function ? K : never\n'; + this.output += ' [K in keyof T]: T[K] extends (...args: any[]) => any ? K : never\n'; this.output += '}[keyof T];\n'; this.output += 'type Dictionary = Partial<_Omit>>;'; this.output += '\n';