瀏覽代碼

docs(type): remove unmount parameters (#2601)

hiroki 5 年之前
父節點
當前提交
18b0c9a011
共有 2 個文件被更改,包括 3 次插入3 次删除
  1. 2 2
      packages/runtime-core/__tests__/apiCreateApp.spec.ts
  2. 1 1
      packages/runtime-core/src/apiCreateApp.ts

+ 2 - 2
packages/runtime-core/__tests__/apiCreateApp.spec.ts

@@ -60,12 +60,12 @@ describe('api: createApp', () => {
     const app = createApp(Comp)
 
     // warning
-    app.unmount(root)
+    app.unmount()
     expect(`that is not mounted`).toHaveBeenWarned()
 
     app.mount(root)
 
-    app.unmount(root)
+    app.unmount()
     expect(serializeInner(root)).toBe(``)
   })
 

+ 1 - 1
packages/runtime-core/src/apiCreateApp.ts

@@ -29,7 +29,7 @@ export interface App<HostElement = any> {
     rootContainer: HostElement | string,
     isHydrate?: boolean
   ): ComponentPublicInstance
-  unmount(rootContainer: HostElement | string): void
+  unmount(): void
   provide<T>(key: InjectionKey<T> | string, value: T): this
 
   // internal, but we need to expose these for the server-renderer and devtools