Lazar Ljubenović

Results 45 issues of Lazar Ljubenović

For a majority of usecases, the following types are treated as equal: ```ts interface Type1 { x?: number } interface Type2 { x: number | undefined } ``` The difference...

help wanted
question

Instead of writing `tg.throwIf(tg.isNot(tg.isString))`, it would be nicer to write `tg.throwUnless(tg.isString)`.

enhancement
good first issue

https://stackoverflow.com/questions/18884249/checking-whether-something-is-iterable

enhancement
good first issue

From [here](https://devblogs.microsoft.com/typescript/announcing-typescript-3-7-beta/): > ```ts > function assertIsString(val: any): asserts val is string { > if (typeof val !== "string") { > throw new AssertionError("Not a string!"); > } > }...

enhancement
question

```ts const isMorphRuleOfType = (type: TMorphType) => { return (rule: MorphRuleBase): rule is MorphRuleBase => { return rule.type === type } } ``` Think of a way to quickly create...

enhancement

Instead of writing ```ts export const isLanguageCode = tg.isEnum(...enumValues(LanguageCode)) ``` where `enumValues` is a function defied as follows ```ts export function enumValues (enumeration: T): Array { return objectKeys(enumeration) .filter(k =>...

enhancement

The lib currently exports `Guard` with only one generic argument: `(x: any) => x is T`, but I found that in code I often need `(x: V) => x is...

enhancement
good first issue

I think it's not gonna be straightforward at all to cover all cases with overloads. But it should at least work nicely with most of the guards. I'm not even...

enhancement
help wanted

- Open issue first for big changes to discuss it. - How to run tests. - How to format commit message.

enhancement