This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Great to express "something" in your app. | |
type Point = { | |
x: number | |
y: number | |
} | |
// Great to make your function params easy to understand | |
function drawPoint (point: Point) { | |
// do stuff | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Point { x: number; } | |
interface Point { y: number; } | |
const point: Point = { x: 1, y: 2 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express, { Request, Response } from "express"; | |
const app = express(); | |
interface Request { | |
isDogRequest: boolean | |
} | |
app.use("/dogs", (req: Request, res: Response, next) => { | |
req.isDogRequest = true; // <-- does not cause an error | |
next(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface AnimalCompare { | |
isDog (): boolean | |
} | |
class Cat implements AnimalCompare {...}; | |
class Dog implements AnimalCompare {...}; | |
const animals = [ | |
new Cat, | |
new Dog, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import GoodBoyEvaluator from "./GoodBoyEvaluator"; | |
class Dog { | |
private gotCookie: boolean; | |
public name: string; | |
constructor (name) { | |
this.name = name; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import express from "express"; | |
import path from "path"; | |
import fs from "fs"; | |
import fileType from "file-type"; | |
import { isArray, promisify } from "util"; | |
interface FileSaveOptions { | |
directory: string | |
buffer: Buffer | |
filename: string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use speech from "nothing" | |
use grab from "lib.little.hands" | |
~ No comments here ~ | |
trump make_murica_great_again: | |
trump: | |
stuff = grab.by.the.file "unbelivable.trump" | |
trump stuff.status: | |
is tremendous -> trump.great_speech | |
is prettygood -> trump.point_at_crowd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/moistly | |
source inclusive_team | |
source perfect_hair | |
source actually_awnser_question_lib # deprecated since mandate.2.0 | |
SORRY=1 | |
THANKYOU=0 | |
keep_working_on_speech () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Author note: I have no idea what I am doing with this function | |
;; I copied stuff into this file | |
;; for some reason adding a bunch of "()" fix issues in the most case | |
;; I think this programming language is too old to fix our issues | |
;; we should rewrite the codebase | |
(defn crime [type]( | |
(type | |
->> (#"drugs" ( | |
map/state/until/nevada || map/state/until/new_hampshire |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
include std::speech | |
include tone::serious | |
include promise::{Help, Work} | |
#[serious()] | |
safe canDoIt (&mut issue: character) -> &'now Help|Work { | |
first { | |
let mut support = issue.map(|family| familiy.need("dream") && "dream"); | |
await std::speech // wait for dramatic speech pause | |
if (support.iter().includes("dream")) { |