Skip to content

Instantly share code, notes, and snippets.

View fell-lucas's full-sized avatar
🔍

Lucas Fell fell-lucas

🔍
View GitHub Profile
@tech-andgar
tech-andgar / LCOV in Windows.md
Last active October 13, 2021 13:56
LCOV in Windows

LCOV in Windows

Required:

* Chocolatey
* Perl
* LCOV

INSTRUCTIONS

@webstrand
webstrand / 000~nonempty-validator.ts
Last active May 27, 2025 21:28
Examples of the <T>(foo: Validator<T>) pattern in typescript
/******************************************************************************
* Implementation of `Nonempty` validator which checks that the provided type
* has at least one defined property, excluding `{}`.
******************************************************************************/
type Nonempty<T extends { [key: string]: any }> = { [P in keyof T]: T }[keyof T];
declare function wantsNonempty<T extends { [key: string]: any }>(x: Nonempty<T>): true;
wantsNonempty({ x: 1 });
wantsNonempty({}); // error expected