-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc3980b
commit 0b55794
Showing
10 changed files
with
41 additions
and
123 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './HookAnimation'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,8 @@ | ||
import type { PropType } from 'vue'; | ||
import { objectWithout } from '@noeldemartin/utils'; | ||
import type { Obj, ObjectWithout } from '@noeldemartin/utils'; | ||
|
||
// TODO extract | ||
type BaseProp<T> = { | ||
type?: PropType<T>; | ||
validator?(value: unknown): boolean; | ||
}; | ||
type OptionalProp<T> = BaseProp<T> & { default: T | (() => T) | null }; | ||
export type Falsish = null | undefined | false; | ||
|
||
export function listenerProp<T extends Function = Function>(): OptionalProp<T | null> { | ||
return { | ||
type: Function as PropType<T>, | ||
default: null, | ||
}; | ||
export function objectWithoutFalsish<T extends Obj>(obj: T): ObjectWithout<T, Falsish> { | ||
return objectWithout(obj, (value) => value === null || value === undefined || value === false); | ||
Check failure on line 7 in src/vivant/vue/components/utils.ts GitHub Actions / ci
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './animations'; | ||
export * from './components'; | ||
export * from './helpers'; | ||
export { default as directives } from './directives'; |