Skip to content

Commit

Permalink
allow some helpers to take non-state getters
Browse files Browse the repository at this point in the history
  • Loading branch information
ECorreia45 committed Nov 18, 2023
1 parent caa3098 commit 01a7347
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beforesemicolon/markup",
"version": "0.4.0",
"version": "0.5.0",
"description": "HTML Templating System",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/is-not.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { val } from '../utils'
*/
export const isNot = helper(
<T>(
st: StateGetter<T>,
st: T | StateGetter<T>,
checker: HelperValueChecker<T> | AnythingButAFunction<T>
) => {
return typeof checker === 'function'
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/is.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { val } from '../utils'
*/
export const is = helper(
<T>(
st: StateGetter<T>,
st: T | StateGetter<T>,
checker: HelperValueChecker<T> | AnythingButAFunction<T>
) => {
return typeof checker === 'function'
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/one-of.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import { val } from '../utils'
* @param st
* @param list
*/
export const oneOf = helper(<T>(st: StateGetter<T>, list: unknown[]) => {
export const oneOf = helper(<T>(st: T | StateGetter<T>, list: unknown[]) => {
return list.includes(val(st))
})

0 comments on commit 01a7347

Please sign in to comment.