Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2609ca4

Browse filesBrowse files
committed
refactor: rename Vue.props with Vue.with
1 parent 9d11761 commit 2609ca4
Copy full SHA for 2609ca4

File tree

Expand file treeCollapse file tree

4 files changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+5
-5
lines changed

‎src/vue.ts

Copy file name to clipboardExpand all lines: src/vue.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ export interface VueConstructor<V extends VueBase = Vue> extends VueMixin<V> {
168168

169169
registerHooks(keys: string[]): void
170170

171-
props<P extends { new (): unknown }>(
171+
with<P extends { new (): unknown }>(
172172
Props: P
173173
): VueConstructor<V & VueWithProps<InstanceType<P>>>
174174
}
@@ -323,7 +323,7 @@ class VueImpl {
323323
this.__h.push(...keys)
324324
}
325325

326-
static props(Props: { new (): unknown }): VueConstructor {
326+
static with(Props: { new (): unknown }): VueConstructor {
327327
const propsMeta = new Props() as Record<string, Prop<any> | undefined>
328328
const props: ComponentObjectPropsOptions = {}
329329

‎test-dts/jsx.tsx

Copy file name to clipboardExpand all lines: test-dts/jsx.tsx
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('JSX', () => {
2424
})
2525
}
2626

27-
class App extends Vue.props(Props) {}
27+
class App extends Vue.with(Props) {}
2828

2929
assertJsx(<App required="Hello" />)
3030
assertJsx(

‎test-dts/props.ts

Copy file name to clipboardExpand all lines: test-dts/props.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ describe('props', () => {
2929
invalidDefault: string = prop({ default: 'default' })
3030
}
3131

32-
class App extends Vue.props(Props) {
32+
class App extends Vue.with(Props) {
3333
mounted() {
3434
const vm = this
3535

‎test/specs/test.spec.ts

Copy file name to clipboardExpand all lines: test/specs/test.spec.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ describe('vue-class-component', () => {
394394
baz = prop({ default: 'default value' })
395395
}
396396

397-
class App extends Vue.props(Props) {}
397+
class App extends Vue.with(Props) {}
398398

399399
const { root } = mount(App, {
400400
foo: 'foo test',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.