Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Fix prettierrc
Browse files Browse the repository at this point in the history
  • Loading branch information
kaorun343 committed Jun 17, 2019
1 parent 888e547 commit 041b08b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"semi": false,
"singleQuote": true,
"tabWidth": 2
"tabWidth": 2,
"trailingComma": "all"
}
16 changes: 8 additions & 8 deletions src/vue-property-decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export function Provide(key?: string | symbol) {
provide = componentOptions.provide = function(this: any) {
let rv = Object.create(
(typeof original === 'function' ? original.call(this) : original) ||
null
null,
)
for (let i in provide.managed) rv[provide.managed[i]] = this[i]
return rv
Expand All @@ -92,14 +92,14 @@ export function ProvideReactive(key?: string | symbol) {
provide = componentOptions.provide = function(this: any) {
let rv = Object.create(
(typeof original === 'function' ? original.call(this) : original) ||
null
null,
)
rv[reactiveInjectKey] = {}
for (let i in provide.managed) {
rv[provide.managed[i]] = this[i] // Duplicates the behavior of `@Provide`
Object.defineProperty(rv[reactiveInjectKey], provide.managed[i], {
enumerable: true,
get: () => this[i]
get: () => this[i],
})
}
return rv
Expand All @@ -117,7 +117,7 @@ const reflectMetadataIsSupported =
function applyMetadata(
options: PropOptions | Constructor[] | Constructor,
target: Vue,
key: string
key: string,
) {
if (reflectMetadataIsSupported) {
if (
Expand All @@ -138,7 +138,7 @@ function applyMetadata(
*/
export function Model(
event?: string,
options: PropOptions | Constructor[] | Constructor = {}
options: PropOptions | Constructor[] | Constructor = {},
) {
return (target: Vue, key: string) => {
applyMetadata(options, target, key)
Expand Down Expand Up @@ -175,7 +175,7 @@ export function Prop(options: PropOptions | Constructor[] | Constructor = {}) {
*/
export function PropSync(
propName: string,
options: PropOptions | Constructor[] | Constructor = {}
options: PropOptions | Constructor[] | Constructor = {},
): PropertyDecorator {
// @ts-ignore
return (target: Vue, key: string) => {
Expand All @@ -191,7 +191,7 @@ export function PropSync(
set(value) {
// @ts-ignore
this.$emit(`update:${propName}`, value)
}
},
}
})(target, key)
}
Expand Down Expand Up @@ -268,7 +268,7 @@ export function Ref(refKey?: string) {
cache: false,
get(this: Vue) {
return this.$refs[refKey || key]
}
},
}
})
}
Expand Down

0 comments on commit 041b08b

Please sign in to comment.