Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile the generator #1

Open
pdonadeo opened this issue Feb 7, 2014 · 2 comments
Open

Can't compile the generator #1

pdonadeo opened this issue Feb 7, 2014 · 2 comments

Comments

@pdonadeo
Copy link

pdonadeo commented Feb 7, 2014

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
Copy link
Owner

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
Copy link
Contributor

seguri commented Feb 10, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants