Skip to content

Instantly share code, notes, and snippets.

View NaridaL's full-sized avatar

Adrian Leonhard NaridaL

  • Microsoft
  • Dublin, Ireland
View GitHub Profile
export type KeysToTrue<T> = {
[P in Key<T>]: true;
}
export type Key<T> = keyof T
export type Mapping<T, S> = {
[P in Key<T>]: S
}
declare module 'express-session' {
import express = require('express');
import node = require('events');
function session(options?: session.SessionOptions): express.RequestHandler;
namespace session {
export interface SessionOptions {
secret: string;
name?: string;
// A.ts
abstract class A {
public static create(t: boolean) {
//noinspection TsLint
const b = new D();
return t ? new B() : new C();
}
abstract foo(): string
// A.ts
abstract class A {
public static create(t: boolean) {
//noinspection TsLint
const b = new D();
return t ? new B() : new C();
}
abstract foo(): string