Skip to content

Commit ecdddf7

Browse files
committed
fix(@angular-devkit/core): literal tag can return any type
Should be a generic that defaults to string
1 parent f0c0b25 commit ecdddf7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/angular_devkit/core/src/utils/literals.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
// tslint:disable-next-line:no-any
9-
export type TemplateTag = (template: TemplateStringsArray, ...substitutions: any[]) => string;
8+
export interface TemplateTag<R = string> {
9+
// Any is the only way here.
10+
// tslint:disable-next-line:no-any
11+
(template: TemplateStringsArray, ...substitutions: any[]): R;
12+
}
1013

1114

1215
// tslint:disable-next-line:no-any

packages/angular_devkit/core/src/virtual-fs/host/buffer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8+
import { TemplateTag } from '../../utils/literals';
89
import { FileBuffer } from './interface';
910

1011
declare const TextEncoder: {

0 commit comments

Comments
 (0)