angular2-rest
angular2-rest copied to clipboard
Tripple Slash Error on import
Getting the following errors when trying to import the module:
[0] node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.
[0] node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS6053: File 'node_modules/angular2-rest/node_modules/angular2/core.d.ts' not found.
[0] node_modules/angular2-rest/angular2-rest.d.ts(2,1): error TS6053: File 'node_modules/angular2-rest/node_modules/angular2/http.d.ts' not found.
[0] node_modules/angular2-rest/angular2-rest.d.ts(3,1): error TS6053: File 'node_modules/angular2-rest/node_modules/rxjs/Rx.d.ts' not found.
Please check if you use the same Angular version as this package.
I was using angular 2 beta 2. Looks like this uses beta 0?
I'm on "angular2": "2.0.0-beta.2", and I'm having exactly the same issue.
node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS2654: Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.
/node_modules/angular2-rest/angular2-rest.d.ts(1,1): error TS6053: File /node_modules/angular2-rest/node_modules/angular2/core.d.ts' not found.
/node_modules/angular2-rest/angular2-rest.d.ts(2,1): error TS6053: File /node_modules/angular2-rest/node_modules/angular2/http.d.ts' not found.
/node_modules/angular2-rest/angular2-rest.d.ts(3,1): error TS6053: File /node_modules/angular2-rest/node_modules/rxjs/Rx.d.ts' not found.
I also get typescript compiler errors about Observable requiring generic type:
@GET("todo/")
public getTodos( @Query("sort") sort?: string): Observable { return null; };
error TS2314: Generic type 'Observable<T>' requires 1 type argument(s).
Changing it to
@GET("todo/")
public getTodos( @Query("sort") sort?: string): Observable<Todo> { return null; };
makes the compiler happier.
Asked 3 months ago and no reply... Is this library maintained?