Skip to content

Instantly share code, notes, and snippets.

View vjau's full-sized avatar

Vincent Jaubert vjau

View GitHub Profile
@vjau
vjau / isExactOptional.ts
Created September 16, 2023 13:01
Utility Typescript Type to know when exactOptionalPropertyTypes is set
type _Intersect = {a?:number} & {a:number|undefined};
//state of exactOptionalPropertyTypes
type IsExactOptional = _Intersect["a"] extends Exclude<_Intersect["a"], undefined> ? true : false;
@ammuench
ammuench / 8BitDoUltimateWifi_Linux.MD
Last active July 16, 2024 20:46
8BitDo Ultimate 2.4GHz wifi working in linux
@milankorsos
milankorsos / redux-actions.ts
Last active November 10, 2022 10:58
Correct TypeScript typing example for Redux Thunk actions
import {Action, ActionCreator, Dispatch} from 'redux';
import {ThunkAction} from 'redux-thunk';
// Redux action
const reduxAction: ActionCreator<Action> = (text: string) => {
return {
type: SET_TEXT,
text
};
};
@ericelliott
ericelliott / essential-javascript-links.md
Last active July 18, 2024 15:03
Essential JavaScript Links
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@stbaer
stbaer / tinytest.api
Last active November 15, 2016 19:10
Meteor tinytest api
test.isFalse(v, msg)
test.isTrue(v, msg)
test.equal(actual, expected, message, not)
test.length(obj, len)
test.include(s, v)
test.isNaN(v, msg)
test.isUndefined(v, msg)
test.isNotNull
test.isNull
test.throws(func)