Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Cannot transpile with typescript 1.5.3 #864

Closed
bruennijs opened this issue Aug 20, 2015 · 4 comments
Closed

Cannot transpile with typescript 1.5.3 #864

bruennijs opened this issue Aug 20, 2015 · 4 comments

Comments

@bruennijs
Copy link

Hello,
I want to compile this:

var readDirObs = rx.Observable.fromNodeCallback(fs.readdir);
return readDirObs(this.dbDir);

My reference expression on top of the file is like this:
///

My tsc compiler command line is like this:
var tsc = spawn('node', ['node_modules/typescript/bin/tsc',
'--module', 'commonjs',
'-t', 'ES5',
'--outDir', './dist/js',
//'./ts/Models.ts',
'./ts/Dal.ts',
'./ts/serverts.ts']);

The transpiler give the following error
Transpile error:
node_modules/rx/ts/rx.all.d.ts(9,36): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(9,40): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(9,57): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(9,69): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(11,26): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(11,30): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(11,41): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(11,59): error TS1005: ',' expected.

node_modules/rx/ts/rx.all.d.ts(11,66): error TS1005: ']' expected.
node_modules/rx/ts/rx.all.d.ts(11,74): error TS1005: ',' expected.
node_modules/rx/ts/rx.all.d.ts(11,75): error TS1136: Property assignment expected.
node_modules/rx/ts/rx.all.d.ts(11,78): error TS1005: ':' expected.
node_modules/rx/ts/rx.all.d.ts(11,81): error TS1005: ')' expected.
node_modules/rx/ts/rx.all.d.ts(14,32): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(14,36): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(14,50): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(27,25): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(27,29): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(27,41): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(125,26): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(125,39): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(126,33): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(126,46): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(126,79): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(127,27): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(127,31): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(127,54): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(128,26): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(128,39): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(129,29): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(129,39): error TS1005: '(' expected.
node_modules/rx/ts/rx.all.d.ts(132,43): error TS1005: '=' expected.
node_modules/rx/ts/rx.all.d.ts(132,61): error TS1005: '(' expected.
Typescript compilier exited


The gruntfile in github has a task 'rebuild-ts' with a A LOT of replace expressions very conditional. Can any body explain what I have to do?
https://github.com/Reactive-Extensions/RxJS/blob/master/Gruntfile.js

Thank you, Olli

@mattpodwysocki
Copy link
Member

@david-driscoll can you answer this question?

@david-driscoll
Copy link
Contributor

@bruennijs Is the project available anywhere (github, zip, whatever).

Is it possible to update to TS 1.5.4? I was doing my testing against the default compiler at http://www.typescriptlang.org/Playground and everything was working there.

The crazy regex's are to get around the generic type alias limitation of ts 1.5 support was added for ts 1.6 @ microsoft/TypeScript#3397

@bruennijs
Copy link
Author

Hello,
YES, the "beta" 1.6 solved my problem. These kind of type aliases in Rxjs caused the problem. Now it works with typescript version "1.6.0-dev.20150821" from npm.

Thanks, Olli

@mattpodwysocki
Copy link
Member

Closing as we will require TypeScript 1.6 going forward.

bouzuya pushed a commit to bouzuya/RxJS that referenced this issue Mar 23, 2016
- make Promistctor parameter as optional in type definition

closes Reactive-Extensions#864
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants