I have an Angular 4 application, which I am upgrading to Angular 5.
I am getting the following error.
ERROR in src/app/application/services/generated/variables.ts(1,10): error TS2305: Module '"..../node_modules/@angular/core/core"' has no exported member 'OpaqueToken'.
Code snippet is :
import { OpaqueToken } from '@angular/core';
export const BASE_PATH = new OpaqueToken('basePath');
export const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
}
This code is been generated by swagger editor.
The OpaqueToken got removed. You have to use the InjectionToken instead. I am facing the same problem. At the Moment the "best" solution is to replace the tokens after each code-gen build. But thats not a permanent solution.
Please contribute to this issue: https://github.com/swagger-api/swagger-codegen/issues/7324