Clean up of duplicate files and formatting

This commit is contained in:
Paul van Brenk
2016-08-16 14:58:52 -07:00
parent 1f015f2c2e
commit 0f6574598a
3 changed files with 20 additions and 226 deletions
-41
View File
@@ -1,41 +0,0 @@
// Type definitions for electron-notifications v0.0.3
// Project: https://github.com/blainesch/electron-notifications
// Definitions by: Daniel Pereira <https://github.com/djpereira>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="../github-electron/github-electron.d.ts" />
declare namespace ElectronNotifications {
interface NotifierOptions {
/** A message to display under the title. */
message?: string,
/** The absolute URL of a icon displayed to the left of the text. */
icon?: string,
/** One or two buttons to display on the right of the notification. */
buttons?: string[]
}
class NotificationWindow extends Electron.BrowserWindow {
/** When the notification was clicked, but not dragged. This usually does the default action, or closes the notification. */
on(event: 'clicked', listener: Function): this;
/** When the notification has been swiped to the right. This usually indiciated the user wants to dismiss the notification. */
on(event: 'swipedRight', listener: Function): this;
/** When any one of the buttons are clicked, it will trigger a buttonClicked event, and pass the text that was clicked to the handler. */
on(event: 'buttonClicked', listener: (text: string) => void): this;
on(event: string, listener: Function): this;
}
}
/** A node module for sending notifications in electron applications */
declare module 'electron-notifications' {
export function notify(title: string, data?: ElectronNotifications.NotifierOptions): ElectronNotifications.NotificationWindow;
}
+20 -22
View File
@@ -11,7 +11,7 @@ interface Symbol {
}
interface SymbolConstructor {
(description?: string|number): Symbol;
(description?: string | number): Symbol;
}
declare var Symbol: SymbolConstructor;
@@ -21,18 +21,18 @@ declare namespace inversify {
namespace interfaces {
export interface KernelConstructor {
new(): Kernel;
new (): Kernel;
}
export interface KernelModuleConstructor {
new(registry: (bind: Bind) => void): KernelModule;
new (registry: (bind: Bind) => void): KernelModule;
}
export interface Newable<T> {
new(...args: any[]): T;
new (...args: any[]): T;
}
export type ServiceIdentifier<T> = (string|Symbol|Newable<T>);
export type ServiceIdentifier<T> = (string | Symbol | Newable<T>);
export interface Binding<T> extends Clonable<Binding<T>> {
guid: string;
@@ -51,7 +51,7 @@ declare namespace inversify {
}
export interface Factory<T> extends Function {
(...args: any[]): (((...args: any[]) => T)|T);
(...args: any[]): (((...args: any[]) => T) | T);
}
export interface FactoryCreator<T> extends Function {
@@ -127,7 +127,7 @@ declare namespace inversify {
bindings: Binding<any>[];
addChildRequest(
serviceIdentifier: ServiceIdentifier<any>,
bindings: (Binding<any>|Binding<any>[]),
bindings: (Binding<any> | Binding<any>[]),
target: Target
): Request;
}
@@ -139,7 +139,7 @@ declare namespace inversify {
metadata: Array<Metadata>;
hasTag(key: string): boolean;
isArray(): boolean;
matchesArray(name: string|Symbol|Newable<any>): boolean;
matchesArray(name: string | Symbol | Newable<any>): boolean;
isNamed(): boolean;
isTagged(): boolean;
matchesNamedTag(name: string): boolean;
@@ -203,14 +203,14 @@ declare namespace inversify {
inSingletonScope(): BindingWhenOnSyntax<T>;
}
export interface BindingInWhenOnSyntax<T> extends BindingInSyntax<T>, BindingWhenOnSyntax<T> {}
export interface BindingInWhenOnSyntax<T> extends BindingInSyntax<T>, BindingWhenOnSyntax<T> { }
export interface BindingOnSyntax<T> {
onActivation(fn: (context: Context, injectable: T) => T): BindingWhenSyntax<T>;
}
export interface BindingToSyntax<T> {
to(constructor: { new(...args: any[]): T; }): BindingInWhenOnSyntax<T>;
to(constructor: { new (...args: any[]): T; }): BindingInWhenOnSyntax<T>;
toConstantValue(value: T): BindingWhenOnSyntax<T>;
toDynamicValue(func: () => T): BindingWhenOnSyntax<T>;
toConstructor<T2>(constructor: Newable<T2>): BindingWhenOnSyntax<T>;
@@ -220,17 +220,17 @@ declare namespace inversify {
toProvider<T2>(provider: ProviderCreator<T2>): BindingWhenOnSyntax<T>;
}
export interface BindingWhenOnSyntax<T> extends BindingWhenSyntax<T>, BindingOnSyntax<T> {}
export interface BindingWhenOnSyntax<T> extends BindingWhenSyntax<T>, BindingOnSyntax<T> { }
export interface BindingWhenSyntax<T> {
when(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
whenTargetNamed(name: string): BindingOnSyntax<T>;
whenTargetTagged(tag: string, value: any): BindingOnSyntax<T>;
whenInjectedInto(parent: (Function|string)): BindingOnSyntax<T>;
whenInjectedInto(parent: (Function | string)): BindingOnSyntax<T>;
whenParentNamed(name: string): BindingOnSyntax<T>;
whenParentTagged(tag: string, value: any): BindingOnSyntax<T>;
whenAnyAncestorIs(ancestor: (Function|string)): BindingOnSyntax<T>;
whenNoAncestorIs(ancestor: (Function|string)): BindingOnSyntax<T>;
whenAnyAncestorIs(ancestor: (Function | string)): BindingOnSyntax<T>;
whenNoAncestorIs(ancestor: (Function | string)): BindingOnSyntax<T>;
whenAnyAncestorNamed(name: string): BindingOnSyntax<T>;
whenAnyAncestorTagged(tag: string, value: any): BindingOnSyntax<T>;
whenNoAncestorNamed(name: string): BindingOnSyntax<T>;
@@ -238,12 +238,11 @@ declare namespace inversify {
whenAnyAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
whenNoAncestorMatches(constraint: (request: Request) => boolean): BindingOnSyntax<T>;
}
}
export var Kernel: interfaces.KernelConstructor;
export var KernelModule: interfaces.KernelModuleConstructor;
export var decorate: (decorator: (ClassDecorator|ParameterDecorator), target: any, parameterIndex?: number) => void;
export var decorate: (decorator: (ClassDecorator | ParameterDecorator), target: any, parameterIndex?: number) => void;
export function injectable(): (typeConstructor: any) => void;
export function tagged(metadataKey: string, metadataValue: any): (target: any, targetKey: string, index?: number) => any;
export function named(name: string): (target: any, targetKey: string, index?: number) => any;
@@ -255,23 +254,22 @@ declare namespace inversify {
): (target: any, targetKey: string, index?: number) => any;
export function makePropertyInjectDecorator(kernel: interfaces.Kernel):
(serviceIdentifier: (string|Symbol|interfaces.Newable<any>)) => (proto: any, key: string) => void;
(serviceIdentifier: (string | Symbol | interfaces.Newable<any>)) => (proto: any, key: string) => void;
export function makePropertyInjectNamedDecorator(kernel: interfaces.Kernel):
(serviceIdentifier: (string|Symbol|interfaces.Newable<any>), named: string) => (proto: any, key: string) => void;
(serviceIdentifier: (string | Symbol | interfaces.Newable<any>), named: string) => (proto: any, key: string) => void;
export function makePropertyInjectTaggedDecorator(kernel: interfaces.Kernel):
(serviceIdentifier: (string|Symbol|interfaces.Newable<any>), key: string, value: any) => (proto: any, propertyName: string) => void;
(serviceIdentifier: (string | Symbol | interfaces.Newable<any>), key: string, value: any) => (proto: any, propertyName: string) => void;
export function makePropertyMultiInjectDecorator(kernel: interfaces.Kernel):
(serviceIdentifier: (string|Symbol|interfaces.Newable<any>)) => (proto: any, key: string) => void;
(serviceIdentifier: (string | Symbol | interfaces.Newable<any>)) => (proto: any, key: string) => void;
// constraint helpers
export var traverseAncerstors: (request: interfaces.Request, constraint: (request: interfaces.Request) => boolean) => boolean;
export var taggedConstraint: (tag: string) => (value: any) => (request: interfaces.Request) => boolean;
export var namedConstraint: (value: any) => (request: interfaces.Request) => boolean;
export var typeConstraint: (type: (Function|string)) => (request: interfaces.Request) => boolean;
export var typeConstraint: (type: (Function | string)) => (request: interfaces.Request) => boolean;
}
export = inversify;
-163
View File
@@ -1,163 +0,0 @@
// Type definitions for WallabyJS
// Project: http://wallabyjs.com
// Definitions by: Andrew Connell <http://www.andrewconnell.com>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare module 'wallabyjs' {
/**
* Wallaby configuration settings.
*
* @interface
*
* @property {IWallabyCompiler=} compilers - File patterns as keys and compiler functions as values.
* @property {boolean=} debug - Flag if debug messages written to Wallaby console (default=false).
* @prooperty {IWallabyEnvironment=} env - Specify a different test runner or change the runner settings.
* @property {string[] | IWallabyFilePattern[]} files - Specifies an array of source files or file name patterns to copy
* to the local cache.
* @property {Function=} postprocessor - Function that runs for every batch of file changes after all compilers and preprocessors.
* @property {Function=} preprocessor - Function that runs for every batch of file changes after all compilers.
* @property {string=} testFramework - Specifies the name and version of the testing framework you are using for your tests.
* @property {string[] | IWallabyFilePattern[]} tests - Specifies an array of test files or test file name patterns to copy
* to the local cache.
* @property {IWallabyWorkers=} workers - Degree of parallelism used to run your tests and controls the way wallaby re-uses workers.
*
* @see {@link https://wallabyjs.com/docs/config/overview.html} for details.
*/
export interface IWallabyConfig {
comilers?: IWallabyCompiler;
debug?: boolean;
env?: IWallabyEnvironment;
files: string[] | IWallabyFilePattern[];
postprocessor?: IWallabyProcessor;
preprocessor?: IWallabyProcessor;
testFramework?: string;
tests: string[] | IWallabyFilePattern[];
workers?: IWallabyWorkers;
}
/**
* Wallaby compiler configuration.
*
* @interface IWallabyCompiler
*
* @see {@link https://wallabyjs.com/docs/config/compilers.html} for details.
*/
export interface IWallabyCompiler {
[pattern: string]: any
}
/**
* Wallaby processor used in pre & post processors.
*
* @interface IWallabyProcessor
*
* @see {@link https://wallabyjs.com/docs/config/preprocessors.html} for details.
*/
export interface IWallabyProcessor {
[pattern: string]: (file: IWallabyFile) => void;
}
/**
* Wallaby file object passed to pre & post processors.
*
* @interface IWallabyFile
*
* @property {string=} content - The current content of the file.
* @property {string=} path - The current path to the file.
* @function rename - Allows you to rename/move the file to newPath.
* @function changeExt - Shortcut for the rename function allowing you to change the file extension.
*
* @see {@link https://wallabyjs.com/docs/config/preprocessors.html} for details.
*/
export interface IWallabyFile {
content?: string;
path?: string;
rename(newPath: string): void;
changeExt(newExt: string): void;
}
/**
* Wallaby file pattern.
*
* @interface IWallabyFilePattern
*
* @property {string} pattern - File name or file pattern.
* @property {boolean=} ignore - Used to completely exclude the file from Wallaby (default=false).
* @property {boolean=} instrument - Determines if file is instrumented (default=true).
* @property {boolean=} load - Determines if the file is loaded to sandbox HTML via script tag .(default=true).
*
* @see {@link https://wallabyjs.com/docs/config/files.html} for details.
*/
export interface IWallabyFilePattern {
pattern: string;
ignore?: boolean;
instrument?: boolean;
load?: boolean;
}
/**
* Wallaby environment configuration.
*
* @interface IWallabyEnvironment
*
* @property {IWallabyEnvironmentParameters=} params - set parameters on environment.
* @property {string=} runner - Path of local Node / PhantomJs / Electron.
* @property {string=} type - Specify a different test runner or change the runner settings.
*
* @see {@link https://wallabyjs.com/docs/config/runner.html} for details.
*/
export interface IWallabyEnvironment {
params?: IWallabyEnvironmentParameters;
runner?: string;
type?: string;
}
/**
* Wallaby environment parameters.
*
* @interface IWallabyEnvironmentParameters
*
* @property {string=} env - Semicolon-separated spawed runner process env variables.
* @property {string=} runner - Space-separated spawed runner process flags.
*
* @see {@link https://wallabyjs.com/docs/config/runner.html} for details.
*/
export interface IWallabyEnvironmentParameters {
env?: string;
runner?: string;
}
/**
* Wallaby worker configuration.
*
* @interface IWallabyWorkers
*
* @property {boolean=} recycle - Specifies the degree of parallelism used to run your tests and
* controls the way wallaby re-uses workers.
*
* @see {@link https://wallabyjs.com/docs/config/workers.html} for details.
*/
export interface IWallabyWorkers {
recycle?: boolean;
}
/**
* Wallaby object passed into config.
*
* @interface IWallaby
*
* @property {string=} localProjectDir - String property which returns the project local folder.
* @property {string=} projectCacheDir - String property which returns the project cache folder.
* @property {IWallabyCompiler=} compilers - Property which allows you to access the built-in TypeScript, CoffeeScript and Babel compilers.
* @property {object=} defaults - Property which allows you to set the default values for file object properties.
*
* @see {@link https://wallabyjs.com/docs/config/overview.html} for details.
*/
export interface IWallaby {
localProjectDir?: string;
projectCacheDir?: string;
compilers?: IWallabyCompiler;
defaults?: any;
}
}