Skip to content

Commit 8220783

Browse files
committed
chore: remove unnecessary casts
1 parent 201cc62 commit 8220783

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

Diff for: src/select.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ export function selectBlock (
1919
loaderContext.callback(
2020
null,
2121
template.content,
22-
// a verison mismatch for the source-map package used in compiler-sfc
23-
// and webpack but it shouldn't matter
24-
template.map as any
22+
template.map
2523
)
2624
return
2725
}
@@ -35,7 +33,7 @@ export function selectBlock (
3533
loaderContext.callback(
3634
null,
3735
script.content,
38-
script.map as any
36+
script.map
3937
)
4038
return
4139
}
@@ -49,7 +47,7 @@ export function selectBlock (
4947
loaderContext.callback(
5048
null,
5149
style.content,
52-
style.map as any
50+
style.map
5351
)
5452
return
5553
}
@@ -60,7 +58,7 @@ export function selectBlock (
6058
loaderContext.callback(
6159
null,
6260
block.content,
63-
block.map as any
61+
block.map
6462
)
6563
}
6664
}

Diff for: src/stylePostLoader.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ const StylePostLoader: webpack.loader.Loader = function(source, inMap) {
1111
source: source as string,
1212
filename: this.resourcePath,
1313
id: `data-v-${query.id}`,
14-
map: inMap as any,
14+
map: inMap,
1515
scoped: !!query.scoped,
1616
trim: true
1717
})
1818

1919
if (errors.length) {
2020
this.callback(errors[0])
2121
} else {
22-
this.callback(null, code, map as any)
22+
this.callback(null, code, map)
2323
}
2424
}
2525

Diff for: src/templateLoader.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ const TemplateLoader: webpack.loader.Loader = function(source, inMap) {
6767
}
6868

6969
const { code, map } = compiled
70-
loaderContext.callback(null, code, map as any)
70+
loaderContext.callback(null, code, map)
7171
}
7272

7373
function getLineOffset(map: RawSourceMap): number {

0 commit comments

Comments
 (0)