airamrguez / titanium-typescript

TypeScript's typings for Titanium Mobile.
7 stars 5 forks source link

Can't compile the generator #1

Open pdonadeo opened 10 years ago

pdonadeo commented 10 years ago

I'd like to generate type definitions for the Alloy library so, before, I'm trying to compile your generator, with no luck. The command:

$ tsc -m commonjs -t ES5 -sourcemap References.ts

dies with this error message:

/Users/pdonadeo/git/titanium-typescript/Generator.ts(19,19): error TS2094: The property 'Join' does not exist on value of type 'String'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(27,19): error TS2094: The property 'Indent' does not exist on value of type 'String'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(145,54): error TS2094: The property 'Indent' does not exist on value of type 'String'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(151,68): error TS2094: The property 'Indent' does not exist on value of type 'String'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(205,43): error TS2094: The property 'Indent' does not exist on value of type 'String'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(210,41): error TS2094: The property 'Indent' does not exist on value of type 'String'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(422,7): error TS2082: Supplied parameters do not match any signature of call target:
    Type 'TiReturnType' is missing property 'length' from type '_.List<TypeField>'.
/Users/pdonadeo/git/titanium-typescript/Generator.ts(422,7): error TS2087: Could not select overload for 'call' expression.

Any suggestion?

airamrguez commented 10 years ago

I had some local changes I've recently pushed. This issue is a bug on Typescript compiler (at least at the time I wrote this code). To avoid this bug I temporarily replicated the extension methods Join and Ident in Util.ts and Generator.ts. That did the trick for me. May be there is other hack as a workaround for that bug. I've cleaned and rebuilt my project and everything compiles fine. I'm using Version 0.9.1.1

seguri commented 10 years ago

This is the last bug to be fixed:

Generator.ts(496,7): error TS2082: Supplied parameters do not match any signature of call target:
    Type 'TiReturnType' is missing property 'length' from type '_.List<TypeField>'.
Generator.ts(496,7): error TS2087: Could not select overload for 'call' expression.