Skip to content

Commit a10fbf1

Browse files
committed
Merge branch 'reedsy-function-typo'
2 parents e3530af + 00c401f commit a10fbf1

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

src/option/emit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { Cons } from '../component'
22
import type { OptionBuilder } from '../optionBuilder'
3-
import { obtainSlot, optoinNullableMemberDecorator } from '../utils'
3+
import { obtainSlot, optionNullableMemberDecorator } from '../utils'
44
export type EmitConfig = null | string
55

6-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string, key?: string) {
6+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string, key?: string) {
77
const slot = obtainSlot(proto)
88
const map = slot.obtainMap('emit');
99
map.set(name, typeof key === 'undefined' ? null : key)

src/option/inject.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import type { InjectionKey } from 'vue'
22
import type { Cons } from '../component'
33
import type { OptionBuilder } from '../optionBuilder'
4-
import { obtainSlot, optoinNullableMemberDecorator } from '../utils'
4+
import { obtainSlot, optionNullableMemberDecorator } from '../utils'
55

66
export interface InjectConfig {
77
from?: string | symbol | Symbol | InjectionKey<any>
88
default?: any
99
}
1010

11-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string, option?: InjectConfig) {
11+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string, option?: InjectConfig) {
1212
const slot = obtainSlot(proto)
1313
const map = slot.obtainMap('inject')
1414
const opt = Object.assign({}, option ?? {})

src/option/methodsAndHooks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Cons } from '../component'
22
import type { OptionBuilder } from '../optionBuilder'
3-
import { obtainSlot, toComponentReverse, excludeNames, getValidNames, optoinNullableMemberDecorator } from '../utils'
3+
import { obtainSlot, toComponentReverse, excludeNames, getValidNames, optionNullableMemberDecorator } from '../utils'
44

55
export const HookNames = [
66
"beforeCreate",
@@ -23,7 +23,7 @@ export const HookNames = [
2323
] as const
2424

2525
export type HookConfig = null
26-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string) {
26+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string) {
2727
const slot = obtainSlot(proto)
2828
const map = slot.obtainMap('hooks');
2929
map.set(name, null)

src/option/props.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Cons } from '../component'
22
import type { OptionBuilder } from '../optionBuilder'
3-
import { obtainSlot, optoinNullableMemberDecorator } from '../utils'
3+
import { obtainSlot, optionNullableMemberDecorator } from '../utils'
44

55
export interface PropsConfig {
66
type?: any
@@ -9,7 +9,7 @@ export interface PropsConfig {
99
validator?(value: any): boolean;
1010
}
1111

12-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string, option?: PropsConfig) {
12+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string, option?: PropsConfig) {
1313
const slot = obtainSlot(proto)
1414
const map = slot.obtainMap('props')
1515
const opt = Object.assign({}, option ?? {})

src/option/ref.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { Cons } from '../component'
22
import { type OptionBuilder, applyAccessors } from '../optionBuilder'
3-
import { obtainSlot, optoinNullableMemberDecorator } from '../utils'
3+
import { obtainSlot, optionNullableMemberDecorator } from '../utils'
44

55
export type RefConfig = null | string
66

7-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string, key?: string) {
7+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string, key?: string) {
88
const slot = obtainSlot(proto)
99
const map = slot.obtainMap('ref')
1010
map.set(name, typeof key === 'undefined' ? null : key)

src/option/vanilla.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { obtainSlot, optoinNullableMemberDecorator } from '../utils'
1+
import { obtainSlot, optionNullableMemberDecorator } from '../utils'
22

3-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string) {
3+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string) {
44
const slot = obtainSlot(proto)
55
const map = slot.obtainMap('vanilla')
66
map.set(name, true)

src/option/vmodel.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import type { Cons } from '../component'
22
import type { OptionBuilder } from '../optionBuilder'
3-
import { obtainSlot, optoinNullableMemberDecorator } from '../utils'
3+
import { obtainSlot, optionNullableMemberDecorator } from '../utils'
44
import { decorator as PropsDecorator, type PropsConfig } from './props'
55

66
export type VModelConfig = PropsConfig & {
77
name?: string
88
}
99

10-
export const decorator = optoinNullableMemberDecorator(function (proto: any, name: string, option?: VModelConfig) {
10+
export const decorator = optionNullableMemberDecorator(function (proto: any, name: string, option?: VModelConfig) {
1111
option ??= {}
1212
const slot = obtainSlot(proto)
1313
let vmodelName = 'modelValue'

src/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export function getValidNames(obj: any, filter: (des: PropertyDescriptor, name:
152152
return Object.keys(descriptors).filter(name => filter(descriptors[name], name))
153153
}
154154

155-
export function optoinNullableMemberDecorator<T>(handler: { (proto: any, name: string, option?: T): any }) {
155+
export function optionNullableMemberDecorator<T>(handler: { (proto: any, name: string, option?: T): any }) {
156156
function decorator(option?: T): any
157157
function decorator(proto: BaseTypeIdentify, name: any): any
158158
function decorator(value: any, ctx: ClassMemberDecoratorContext): any //deco stage 3

0 commit comments

Comments
 (0)