Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Sep 28, 2021
1 parent 6a27ec3 commit 63ab1c8
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 5,897 deletions.
5,807 changes: 0 additions & 5,807 deletions package-lock.json

This file was deleted.

7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
"jest": "^26.0.1",
"rollup": "^2.17.1",
"rollup-plugin-sourcemaps": "^0.6.2",
"rollup-plugin-typescript": "^1.0.1",
"ts-jest": "^26.1.0",
"tslib": "^2.0.0",
"typescript": "^4.4.2"
"rollup-plugin-typescript2": "^0.30.0",
"tslib": "^2.3.1",
"typescript": "^4.4.3"
},
"dependencies": {
"@vue/reactivity": "^3.0.5"
Expand Down
7 changes: 2 additions & 5 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pkg from "./package.json";
import typescript from "rollup-plugin-typescript";
import typescript from "rollup-plugin-typescript2";
import sourceMaps from "rollup-plugin-sourcemaps";
import resolve from "@rollup/plugin-node-resolve";
import commonjs from "@rollup/plugin-commonjs";
Expand All @@ -15,10 +15,7 @@ export default {
}),
resolve(),
commonjs(),
typescript({
exclude: "node_modules/**",
typescript: require("typescript"),
}),
typescript(),
sourceMaps(),
],
output: [
Expand Down
2 changes: 1 addition & 1 deletion src/runtime-core/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ function applyOptions() {

let currentInstance = {};
// 这个接口暴露给用户,用户可以在 setup 中获取组件实例 instance
export function getCurrentInstance() {
export function getCurrentInstance(): any {
return currentInstance;
}

Expand Down
6 changes: 3 additions & 3 deletions src/runtime-core/vnode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ShapeFlags } from "../shared";

export const createVNode = function (
type: any,
props?: any = {},
props?: any,
children?: string | Array<any>
) {
// 注意 type 有可能是 string 也有可能是对象
Expand All @@ -14,9 +14,9 @@ export const createVNode = function (
const vnode = {
el: null,
component: null,
key: props.key || null,
key: props?.key,
type,
props,
props: props || {},
children,
shapeFlag: getShapeFlag(type),
};
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"strict": true,
"moduleResolution": "node",
"esModuleInterop": true,
"target": "es5",
"module": "commonjs",
"target": "es2016",
"module": "esnext",
"noImplicitAny": false,
"removeComments": true,
"preserveConstEnums": true,
Expand Down
Loading

0 comments on commit 63ab1c8

Please sign in to comment.