You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/guide/extras/web-components.md
+2-6
Original file line number
Diff line number
Diff line change
@@ -307,8 +307,7 @@ declare module 'vue' {
307
307
Here is the recommended way to enable type checking in SFC templates of Custom Elements that are not built with Vue.
308
308
309
309
:::tip Note
310
-
- This approach is one possible way to do it, but it may vary depending on the
311
-
- framework being used to create the custom elements.
310
+
This approach is one possible way to do it, but it may vary depending on the framework being used to create the custom elements.
312
311
:::
313
312
314
313
Suppose we have a custom element with some JS properties and events defined, and it is shipped in a library called `some-lib`:
@@ -391,10 +390,7 @@ type VueEmit<T extends EventMap> = EmitFn<{
391
390
```
392
391
393
392
:::tip Note
394
-
- We marked `$props` and `$emit` as deprecated so that when we get a `ref` to
395
-
- a custom element we will not be tempted to use these properties, as these
396
-
- properties are for type checking purposes only when it comes to custom elements.
397
-
- These properties do not actually exist on the custom element instances.
393
+
We marked `$props` and `$emit` as deprecated so that when we get a `ref` to a custom element we will not be tempted to use these properties, as these properties are for type checking purposes only when it comes to custom elements. These properties do not actually exist on the custom element instances.
398
394
:::
399
395
400
396
Using the type helper we can now select the JS properties that should be exposed for type checking in Vue templates:
0 commit comments