refactor: change provide(...) for {provide: ...}
- provide() is deprecated, - {} syntax is required by the offline compiler
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import {bind, provide} from '@angular/core/src/di';
|
||||
import {bind} from '@angular/core/src/di';
|
||||
import {Options} from './common';
|
||||
|
||||
export * from './common';
|
||||
@ -11,7 +11,7 @@ var fs = require('fs');
|
||||
// find another way...
|
||||
// Note: Can't do the `require` call in a facade as it can't be loaded into the browser
|
||||
// for our unit tests via karma.
|
||||
Options.DEFAULT_PROVIDERS.push(bind(Options.WRITE_FILE).toValue(writeFile));
|
||||
Options.DEFAULT_PROVIDERS.push({provide: Options.WRITE_FILE, useValue: writeFile});
|
||||
|
||||
function writeFile(filename, content): Promise<any> {
|
||||
return new Promise(function(resolve, reject) {
|
||||
|
Reference in New Issue
Block a user