Skip to content

Commit

Permalink
fix(@angular-devkit/core): literal tag can return any type
Browse files Browse the repository at this point in the history
Should be a generic that defaults to string
  • Loading branch information
hansl committed Jun 6, 2018
1 parent f0c0b25 commit ecdddf7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/angular_devkit/core/src/utils/literals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
// tslint:disable-next-line:no-any
export type TemplateTag = (template: TemplateStringsArray, ...substitutions: any[]) => string;
export interface TemplateTag<R = string> {
// Any is the only way here.
// tslint:disable-next-line:no-any
(template: TemplateStringsArray, ...substitutions: any[]): R;
}


// tslint:disable-next-line:no-any
Expand Down
1 change: 1 addition & 0 deletions packages/angular_devkit/core/src/virtual-fs/host/buffer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { TemplateTag } from '../../utils/literals';
import { FileBuffer } from './interface';

declare const TextEncoder: {
Expand Down

0 comments on commit ecdddf7

Please sign in to comment.