Skip to content

Commit f036db5

Browse files
committed
remove custom modules and use the typescript ones
1 parent 52d3a7c commit f036db5

File tree

5 files changed

+9
-45
lines changed

5 files changed

+9
-45
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,5 +154,8 @@
154154
"commitizen": {
155155
"path": "./node_modules/cz-conventional-changelog"
156156
}
157+
},
158+
"dependencies": {
159+
"@types/he": "^1.1.1"
157160
}
158161
}

src/compiler/parser/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
// const he = require('he')
32
import he from 'he'
43
import { parseHTML } from './html-parser'
54
import { parseText } from './text-parser'

src/sfc/parser.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ export function parseComponent(
9898
currentBlock.end = start
9999
let text = content.slice(currentBlock.start, currentBlock.end)
100100
if (options.deindent !== false) {
101-
//@ts-expect-error
102101
text = deindent(text)
103102
}
104103
// pad content so that linters and pre-processors can output correct

typescript/modules.d.ts

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,3 @@
1-
declare module 'he' {
2-
function escape(html: string): string
3-
function decode(html: string): string
4-
}
5-
6-
declare module 'source-map' {
7-
class SourceMapGenerator {
8-
setSourceContent(filename: string, content: string): void
9-
addMapping(mapping: Object): void
10-
toString(): string
11-
}
12-
class SourceMapConsumer {
13-
constructor(map: Object)
14-
originalPositionFor(position: {
15-
line: number
16-
column: number
17-
}): {
18-
source: string | null
19-
line: number | null
20-
column: number | null
21-
}
22-
}
23-
}
24-
25-
declare module 'lru-cache' {
26-
var exports: {
27-
(): any
28-
}
29-
}
30-
311
declare module 'de-indent' {
322
export default function deindent (input: string): string
33-
}
34-
35-
declare module 'serialize-javascript' {
36-
var exports: {
37-
(input: string, options: { isJSON: boolean }): string
38-
}
39-
}
40-
41-
declare module 'lodash.template' {
42-
var exports: {
43-
(input: string, options: { interpolate: RegExp; escape: RegExp }): Function
44-
}
45-
}
3+
}

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,6 +1104,11 @@
11041104
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f"
11051105
integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==
11061106

1107+
"@types/he@^1.1.1":
1108+
version "1.1.1"
1109+
resolved "https://registry.yarnpkg.com/@types/he/-/he-1.1.1.tgz#19e14033c4ee8f1a702c74dcc6182664839ac2b7"
1110+
integrity sha512-jpzrsR1ns0n3kyWt92QfOUQhIuJGQ9+QGa7M62rO6toe98woQjnsnzjdMtsQXCdvjjmqjS2ZBCC7xKw0cdzU+Q==
1111+
11071112
"@types/json-schema@^7.0.3":
11081113
version "7.0.7"
11091114
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad"

0 commit comments

Comments
 (0)