Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Doubling Down

Various Authors variousauthors

🐢
Doubling Down
View GitHub Profile
View typeguard.md

I have this helper I use to make type guards.

const typeGuard = buildTypeGuard<{ name: string, friends: IFriend[] }>({
  name: isString,
  friends: [isFriend],
})

It takes a type and an argument. The argument is a "type guide" which is instructions on how to build the typeguard. The type determines the shape of the type guide. So if you pass in a type with { friends: IFriend[] } you must pass in a type guide that includes { friends: [isFriend] }.

@variousauthors
variousauthors / readme.txt
Created Jul 25, 2020
Prototype (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Jul 19, 2020
Prototype (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Jul 19, 2020
Prototype (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Jul 19, 2020
Simple Block Pushing Game (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Jun 27, 2020
Abandon (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Jun 27, 2020
Simple Block Pushing Game (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Jun 27, 2020
Exercice de Style (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Oct 28, 2019
Exercice de Style (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@variousauthors
variousauthors / readme.txt
Created Apr 29, 2019
Push Space (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in http://www.puzzlescript.net/editor.html