This file contains 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
Show hidden characters
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true | |
}, | |
"globals": { | |
"define": true, | |
"require": true, |
This file contains 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
{ | |
"name": "nomes", | |
"version": "1.0.0", | |
"description": "", | |
"main": "index.html", | |
"devDependencies": { | |
"ts-loader": "^0.8.2", | |
"typescript": "^1.8.10" | |
}, | |
"scripts": { |
This file contains 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
export interface IBar { | |
foo: boolean; | |
} |
This file contains 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
/* eslint-disable */ | |
let indent = 1; | |
function log(Class) { | |
const descriptors = {}; | |
Reflect.ownKeys(Class.prototype).forEach(key => { | |
const descriptor = Reflect.getOwnPropertyDescriptor(Class.prototype, key); | |
const {value} = descriptor; | |
descriptors[key] = descriptor; |
This file contains 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 IChainLink { | |
type: 'resource' | 'value'; | |
value: string; | |
} | |
type SingleApiIndex<T> = { [p in keyof T]: SingleApi<T[p]>; }; | |
type ApiIndex<T> = { [p in keyof T]: Api<T[p]>; }; | |
interface BaseApi<T> { |
This file contains 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
class ReadableStream<T> { | |
// ... | |
debounce(milliseconds: number): ReadableStream<T[]>; | |
debounce<TOut>(milliseconds: number, join?: (list: T[]) => TOut): ReadableStream<TOut> { | |
let lastTime = Date.now(); | |
let buffer: T[] = []; | |
return new ReadableStream<TOut>((push: (value: TOut) => void) => { |
This file contains 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
type myMethodSignature<T> = (value: T) => void; | |
class Test { | |
alias: myMethodSignature<T>; | |
constructor() { | |
this.alias = this.myMethod.bind(this); | |
} | |
myMethod<T>(value: T): void {} |
This file contains 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
function stringify(value, indent = '') { | |
const nextIndent = `${indent} `; | |
if (isNative(value)) | |
return JSON.stringify(value); | |
if (Array.isArray(value)) { | |
if (value.length === 1 && isNative(value[0])) | |
return JSON.stringify(value); |
This file contains 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
#!/usr/bin/env bash | |
cmd=$@; | |
for i in $(ls) | |
do | |
if [ -d "$i" ] | |
then | |
echo "Entering ./$i" | |
cd "$i" |
This file contains 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
#!/usr/bin/env node | |
const {promisify} = require('util'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const glob = promisify(require('glob')); | |
const readFile = promisify(fs.readFile); | |
const writeFile = promisify(fs.writeFile); | |
const extension = process.argv[3]; |