diff --git a/modules/@angular/compiler/src/shadow_css.ts b/modules/@angular/compiler/src/shadow_css.ts index e15f58b105..0abf47876a 100644 --- a/modules/@angular/compiler/src/shadow_css.ts +++ b/modules/@angular/compiler/src/shadow_css.ts @@ -509,7 +509,7 @@ export class CssRule { constructor(public selector: string, public content: string) {} } -export function processRules(input: string, ruleCallback: Function): string { +export function processRules(input: string, ruleCallback: (rule: CssRule) => CssRule): string { const inputWithEscapedBlocks = escapeBlocks(input); let nextBlockIndex = 0; return inputWithEscapedBlocks.escapedString.replace(_ruleRe, function(...m: string[]) { diff --git a/modules/@angular/compiler/test/shadow_css_spec.ts b/modules/@angular/compiler/test/shadow_css_spec.ts index 3750f8b004..63b1e8845a 100644 --- a/modules/@angular/compiler/test/shadow_css_spec.ts +++ b/modules/@angular/compiler/test/shadow_css_spec.ts @@ -207,8 +207,8 @@ export function main() { describe('processRules', () => { describe('parse rules', () => { function captureRules(input: string): CssRule[] { - const result: any[] /** TODO #9100 */ = []; - processRules(input, (cssRule: any /** TODO #9100 */) => { + const result: CssRule[] = []; + processRules(input, (cssRule) => { result.push(cssRule); return cssRule; }); @@ -239,15 +239,15 @@ export function main() { describe('modify rules', () => { it('should allow to change the selector while preserving whitespaces', () => { expect(processRules( - '@import a; b {c {d}} e {f}', (cssRule: any /** TODO #9100 */) => new CssRule( - cssRule.selector + '2', cssRule.content))) + '@import a; b {c {d}} e {f}', + (cssRule: CssRule) => new CssRule(cssRule.selector + '2', cssRule.content))) .toEqual('@import a2; b2 {c {d}} e2 {f}'); }); it('should allow to change the content', () => { expect(processRules( - 'a {b}', (cssRule: any /** TODO #9100 */) => - new CssRule(cssRule.selector, cssRule.content + '2'))) + 'a {b}', + (cssRule: CssRule) => new CssRule(cssRule.selector, cssRule.content + '2'))) .toEqual('a {b2}'); }); });