Skip to content

Instantly share code, notes, and snippets.

View danwbyrne's full-sized avatar
🌞
Focusing

Daniel Byrne danwbyrne

🌞
Focusing
View GitHub Profile
export const bar = 'bang';
const sc1 = 'bar';
const foo = sc1;
const fizz = { foo: foo };
export { fizz };
import { tsUtils } from '@neo-one/ts-utils';
import * as fs from 'fs-extra';
import path from 'path';
import ts from 'typescript';
import { Concatenator } from './Concatenator';
export type SymbolAndSources = { readonly [Symbol in string]: string };
export type SourceFileSymbolAndSources = { readonly [SourceFile in string]: SymbolAndSources };
export function concatenate(entry: string) {
@danwbyrne
danwbyrne / neo-one-utils.ts
Created October 26, 2018 20:08
neo-one-utils (concatenated)
const directorySeparator = '/';
const backslashRegExp = /\\/g;
export function normalizePath(path: string): string {
return path.replace(backslashRegExp, directorySeparator);
}
import { pascalCase } from "change-case";
export const upperCaseFirst = pascalCase;
import { iif, Observable, throwError, timer, Observer, Subscriber, Subscription } from "rxjs";
import { concatMap, retryWhen } from "rxjs/operators";
export interface RetryBackoffConfig {
@danwbyrne
danwbyrne / RESULT.ts
Created October 26, 2018 17:27
Interface Substitution Failure
import { Foo } from '/Users/danielbyrne/neo-one/packages/neo-one-typescript-concatenator/src/__data__/test-directories/interfaces/base/child.ts';
interface Bang {
readonly bang: Foo;
}
export interface Fizz {
readonly fizz: Bang;
}
@danwbyrne
danwbyrne / RESULT.ts
Created October 25, 2018 22:59
Const Dynamic Exports With Collisions
const s55 = 'bar';
const bar = s55;
const fizz = 'bang';
const sc1 = bar;
export const foo = sc1;
const fizz = 'bang';
const parent = 'parent';
@danwbyrne
danwbyrne / RESULT.ts
Created October 25, 2018 22:27
Const Export Concatenation Example
const barInternal = 'bar';
const bangInternal = 'bang';
export const bar = barInternal;
const bang = bangInternal;
const fooInternal = 'foo';
const fizzInternal = 'fizz';
export const foo = fooInternal;
const fizz = fizzInternal;
export const newFizz = fizz;
export const newBang = bang;
@danwbyrne
danwbyrne / Bar.ts
Last active October 12, 2018 01:23
Collisions Test Results
import { Bar, bar } from './Bar';
export function Foo(value: Bar): boolean {
if (value.fizz === bar.fizz) {
return true;
}
return false;
}
export interface Foo {}
export class Bar {
public constructor() {
//
}
public do(): Foo {
return {};
}
}
import { merge, Observable, Observer } from 'rxjs';
import { distinctUntilChanged, filter, scan } from 'rxjs/internal/operators';
import { map } from 'rxjs/operators';
import { unless } from '../shared/operators';
export interface KeyEvent {
readonly keyCode: number;
}
export const keyEventStream = (
{"name":"unhandled_rejection","level":"error","message":"Unhandled rejection. Shutting down. IO error: C:\\Users\\Dan\\AppData\\Local\\neo-one\\Data\\plugin\\neo-one-server-plugin-network\\network\\manager\\resources\\neo-one-playground-local-42ad9c06-43c8-4c93-a375-9c454a3d0380\\nodes\\neo-one-playground-local-42ad9c06-43c8-4c93-a375-9c454a3d0380-0\\chain\\data/MANIFEST-000001: The system cannot find the path specified.\r\n","labels":{"error":true,"error.kind":"Error","service":"cli","component":"cli"},"data":{},"stack":"OpenError: IO error: C:\\Users\\Dan\\AppData\\Local\\neo-one\\Data\\plugin\\neo-one-server-plugin-network\\network\\manager\\resources\\neo-one-playground-local-42ad9c06-43c8-4c93-a375-9c454a3d0380\\nodes\\neo-one-playground-local-42ad9c06-43c8-4c93-a375-9c454a3d0380-0\\chain\\data/MANIFEST-000001: The system cannot find the path specified.\r\n\n at C:\\Users\\Dan\\Desktop\\neo-one-playground\\node_modules\\levelup\\lib\\levelup.js:87:23\n at C:\\Users\\Dan\\Desktop\\neo-one-playground