Skip to content

Commit

Permalink
chore: no implicit any for local vars (#4314)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed Jul 19, 2021
1 parent 3a5acd0 commit 134d0a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/plugin-vue/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
getPrevDescriptor,
setDescriptor
} from './utils/descriptorCache'
import { PluginContext, TransformPluginContext } from 'rollup'
import { PluginContext, SourceMap, TransformPluginContext } from 'rollup'
import { normalizePath } from '@rollup/pluginutils'
import { resolveScript } from './script'
import { transformTemplateInMain } from './template'
Expand Down Expand Up @@ -63,7 +63,7 @@ export async function transformMain(
const hasTemplateImport = descriptor.template && !useInlineTemplate

let templateCode = ''
let templateMap
let templateMap: RawSourceMap | undefined
if (hasTemplateImport) {
;({ code: templateCode, map: templateMap } = await genTemplateCode(
descriptor,
Expand Down Expand Up @@ -239,7 +239,8 @@ async function genScriptCode(
map: RawSourceMap
}> {
let scriptCode = `const _sfc_main = {}`
let map
let map: RawSourceMap | SourceMap | undefined

const script = resolveScript(descriptor, options, ssr)
if (script) {
// If the script is js/ts and has no external src, it can be directly placed
Expand Down
3 changes: 2 additions & 1 deletion packages/plugin-vue/src/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ export function resolveTemplateCompilerOptions(
const { id, filename, cssVars } = descriptor

let transformAssetUrls = options.template?.transformAssetUrls
let assetUrlOptions
// @vue/compiler-sfc/dist/compiler-sfc.d.ts should export `AssetURLOptions`
let assetUrlOptions //: AssetURLOptions | undefined
if (options.devServer) {
// during dev, inject vite base so that @vue/compiler-sfc can transform
// relative paths directly to absolute paths without incurring an extra import
Expand Down

0 comments on commit 134d0a1

Please sign in to comment.