@@ -6,20 +6,20 @@ import { Optimizer } from "opticss";
6
6
import * as postcss from "postcss" ;
7
7
import * as readdir from "recursive-readdir" ;
8
8
9
+ import { TemplateTypes } from "@opticss/template-api" ;
10
+
9
11
import { BroccoliPlugin } from "./utils" ;
10
12
11
13
export interface BroccoliOptions {
12
14
entry : string [ ] ;
13
15
output : string ;
14
- // tslint:disable-next-line:prefer-whatever-to-any
15
- analyzer : Analyzer < any > ;
16
+ analyzer : Analyzer < keyof TemplateTypes > ;
16
17
transport : { [ key : string ] : object } ;
17
18
}
18
19
19
20
class BroccoliCSSBlocks extends BroccoliPlugin {
20
21
21
- // tslint:disable-next-line:prefer-whatever-to-any
22
- private analyzer : Analyzer < any > ;
22
+ private analyzer : Analyzer < keyof TemplateTypes > ;
23
23
private entry : string [ ] ;
24
24
private output : string ;
25
25
private transport : { [ key : string ] : object } ;
@@ -93,7 +93,7 @@ class BroccoliCSSBlocks extends BroccoliPlugin {
93
93
94
94
// Run optimization and compute StyleMapping.
95
95
let optimized = await optimizer . optimize ( this . output ) ;
96
- let styleMapping = new StyleMapping < "Opticss.Template" > ( optimized . styleMapping , blocks , options , this . analyzer . analyses ( ) ) ;
96
+ let styleMapping = new StyleMapping ( optimized . styleMapping , blocks , options , this . analyzer . analyses ( ) ) ;
97
97
98
98
// Attach all computed data to our magic shared memory transport object...
99
99
this . transport . mapping = styleMapping ;
0 commit comments