Add some type utils, findFeed, and fix feed listener to use limit: 0 instead of since
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@welshman/lib",
|
||||
"version": "0.4.5",
|
||||
"version": "0.4.6",
|
||||
"author": "hodlbod",
|
||||
"license": "MIT",
|
||||
"description": "A collection of utilities.",
|
||||
|
||||
@@ -14,6 +14,14 @@ export const isNotNil = <T>(x: T, ...args: unknown[]) => x !== undefined && x !=
|
||||
|
||||
export const assertNotNil = <T>(x: T, ...args: unknown[]) => x!
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Working with types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
export type Override<T, R> = Omit<T, keyof R> & R
|
||||
|
||||
export type MakeOptional<T, K extends keyof T> = Override<T, Partial<Pick<T, K>>>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Basic functional programming utilities
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user