diff --git a/types/ember/v1/index.d.ts b/types/ember/v1/index.d.ts index f36952117e..5451dd2293 100644 --- a/types/ember/v1/index.d.ts +++ b/types/ember/v1/index.d.ts @@ -192,7 +192,6 @@ interface String { } interface Array { - constructor(arr: any[]): void; activate(): void; addArrayObserver(target: any, opts?: EnumerableConfigurationOptions): any[]; addEnumerableObserver(target: any, opts: EnumerableConfigurationOptions): any[]; diff --git a/types/forge-di/index.d.ts b/types/forge-di/index.d.ts index 87814004d4..d7b3dd8965 100644 --- a/types/forge-di/index.d.ts +++ b/types/forge-di/index.d.ts @@ -12,7 +12,7 @@ declare class Forge { * Creates a new instance * @returns {Forge} a new instance. */ - new(): Forge; + constructor(); /** * The bindings mapped to this forge instance. diff --git a/types/google-drive-realtime-api/index.d.ts b/types/google-drive-realtime-api/index.d.ts index 6cfd9b1cc1..0849c3b0a7 100644 --- a/types/google-drive-realtime-api/index.d.ts +++ b/types/google-drive-realtime-api/index.d.ts @@ -52,8 +52,8 @@ declare namespace gapi.drive.realtime { // use the permissionId property. userId : string; - new (sessionId:string, userId:string, displayName:string, color:string, isMe:boolean, isAnonymous:boolean, - photoUrl:string, permissionId:string) : Collaborator; + constructor (sessionId:string, userId:string, displayName:string, color:string, isMe:boolean, isAnonymous:boolean, + photoUrl:string, permissionId:string); } // Complete diff --git a/types/knockback/index.d.ts b/types/knockback/index.d.ts index 51c9b713e9..214dedca3c 100644 --- a/types/knockback/index.d.ts +++ b/types/knockback/index.d.ts @@ -76,8 +76,8 @@ declare namespace Knockback { constructor (format: KnockoutObservable, args: any[]); } - interface LocalizedObservable { - constructor (value: any, options: any, vm: any); + class LocalizedObservable { + constructor(value: any, options: any, vm: any); destroy(); resetToCurrent(); observedValue(value: any); diff --git a/types/microsoft-ajax/index.d.ts b/types/microsoft-ajax/index.d.ts index 7df55a8996..562f81fafc 100644 --- a/types/microsoft-ajax/index.d.ts +++ b/types/microsoft-ajax/index.d.ts @@ -627,7 +627,7 @@ declare namespace Sys { //#region Constructors - constructor(): void; + new(): void; //#endregion @@ -2505,8 +2505,7 @@ declare namespace Sys { * @see {@link http://msdn.microsoft.com/en-us/library/bb383800(v=vs.100).aspx} */ class ProfileService { - - new(): ProfileService; + constructor(); //#region Fields @@ -2525,24 +2524,29 @@ declare namespace Sys { //#region Methods /** - * Loads the specified profile properties. - * - * If propertyNames is not supplied, all profile properties enabled for read access are loaded from the server. - * The loaded profile can then be accessed directly from the properties field. - * This enables your application to access the profile properties by using simple field syntax, as shown in the following example: - * @example - * Sys.Services.ProfileService.load(null, LoadCompletedCallback, ProfileFailedCallback, null); - * - * @param propertyName - * A string array that contains the profile properties to load. - * @param loadCompletedCallback - * The function that is called when loading has completed. The default is null. - * @param failedCallback - * The function that is called when loading has failed. The default is null. - * @param userContext - * User context information passed to the callback functions. - */ - static load(propertyNames: string[], loadCompletedCallback: Function, failedCallback: Function, userContext: any): void; + * Loads the specified profile properties. + * + * If propertyNames is not supplied, all profile properties enabled for read access are loaded from the server. + * The loaded profile can then be accessed directly from the properties field. + * This enables your application to access the profile properties by using simple field syntax, as shown in the following example: + * @example + * Sys.Services.ProfileService.load(null, LoadCompletedCallback, ProfileFailedCallback, null); + * + * @param propertyName + * A string array that contains the profile properties to load. + * @param loadCompletedCallback + * The function that is called when loading has completed. The default is null. + * @param failedCallback + * The function that is called when loading has failed. The default is null. + * @param userContext + * User context information passed to the callback functions. + */ + static load( + propertyNames: string[], + loadCompletedCallback: Function, + failedCallback: Function, + userContext: any, + ): void; /** * @param propertyNames * A string array that contains the profile properties to save. @@ -2553,7 +2557,12 @@ declare namespace Sys { * @param userContext * User context information passed to the callback functions. */ - static save(propertyNames: string[], saveCompletedCallback: Function, failedCallback: Function, userContext: any): void; + static save( + propertyNames: string[], + saveCompletedCallback: Function, + failedCallback: Function, + userContext: any, + ): void; //#endregion diff --git a/types/mongoose/index.d.ts b/types/mongoose/index.d.ts index 8effce9150..9673733113 100644 --- a/types/mongoose/index.d.ts +++ b/types/mongoose/index.d.ts @@ -620,7 +620,7 @@ declare module "mongoose" { * QueryCursor can only be accessed by query#cursor(), we only * expose its interface to enable type-checking. */ - interface QueryCursor extends stream.Readable { + class QueryCursor extends stream.Readable { /** * A QueryCursor is a concurrency primitive for processing query results * one document at a time. A QueryCursor fulfills the Node.js streams3 API, @@ -634,7 +634,7 @@ declare module "mongoose" { * @event data Emitted when the stream is flowing and the next doc is ready * @event end Emitted when the stream is exhausted */ - constructor(query: Query, options: any): QueryCursor; + constructor(query: Query, options: any); /** Marks this cursor as closed. Will stop streaming and subsequent calls to next() will error. */ close(callback?: (error: any, result: any) => void): Promise; diff --git a/types/mongoose/v3/index.d.ts b/types/mongoose/v3/index.d.ts index 6aee94c90c..4cdfe4b1e3 100644 --- a/types/mongoose/v3/index.d.ts +++ b/types/mongoose/v3/index.d.ts @@ -45,8 +45,8 @@ declare module "mongoose" { Promise: any; } - export interface Connection extends NodeJS.EventEmitter { - constructor(base: Mongoose): Connection; + export class Connection extends NodeJS.EventEmitter { + constructor(base: Mongoose); close(callback?: (err: any) => void): Connection; collection(name: string, options?: Object): Collection; diff --git a/types/mongoose/v4/index.d.ts b/types/mongoose/v4/index.d.ts index 87c558ea0e..8437d57efb 100644 --- a/types/mongoose/v4/index.d.ts +++ b/types/mongoose/v4/index.d.ts @@ -215,7 +215,7 @@ declare module "mongoose" { * QueryStream can only be accessed using query#stream(), we only * expose its interface here. */ - interface QueryStream extends stream.Stream { + class QueryStream extends stream.Stream { /** * Provides a Node.js 0.8 style ReadStream interface for Queries. * @event data emits a single Mongoose document @@ -230,7 +230,7 @@ declare module "mongoose" { */ transform?: Function; [other: string]: any; - }): QueryStream; + }); /** * Destroys the stream, closing the underlying cursor, which emits the close event. @@ -550,7 +550,7 @@ declare module "mongoose" { * QueryCursor can only be accessed by query#cursor(), we only * expose its interface to enable type-checking. */ - interface QueryCursor extends stream.Readable { + class QueryCursor extends stream.Readable { /** * A QueryCursor is a concurrency primitive for processing query results * one document at a time. A QueryCursor fulfills the Node.js streams3 API, @@ -564,7 +564,7 @@ declare module "mongoose" { * @event data Emitted when the stream is flowing and the next doc is ready * @event end Emitted when the stream is exhausted */ - constructor(query: Query, options: any): QueryCursor; + constructor(query: Query, options: any); /** Marks this cursor as closed. Will stop streaming and subsequent calls to next() will error. */ close(callback?: (error: any, result: any) => void): Promise; diff --git a/types/oja/index.d.ts b/types/oja/index.d.ts index f1d123d3f0..20a8e068c3 100644 --- a/types/oja/index.d.ts +++ b/types/oja/index.d.ts @@ -29,7 +29,7 @@ export type AddableFunction = (runtime: Flow) => void; export type AddableToAction = Action | AddableFunction; export class EventContext { - new(context: EventContext | object): this; + constructor(context: EventContext | object); stageContext(topics: string | ReadonlyArray): StageContext; state(): State; repub(type: string, handler: (event: any) => void): void; @@ -44,7 +44,7 @@ export class StageContext extends EventContext { } export class ReadableStream extends Readable { - new(topic: string, emitter: EventEmitter): this; + constructor(topic: string, emitter: EventEmitter); push(data: any): boolean; } diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a8601d00b1..6161c936e7 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -89,8 +89,8 @@ interface EventSubscription { * EventSubscriptionVendor stores a set of EventSubscriptions that are * subscribed to a particular event type. */ -interface EventSubscriptionVendor { - constructor(): EventSubscriptionVendor; +declare class EventSubscriptionVendor { + constructor(); /** * Adds a subscription keyed by an event type. diff --git a/types/routie/index.d.ts b/types/routie/index.d.ts index a3443e93ae..a8e1fb0b9d 100644 --- a/types/routie/index.d.ts +++ b/types/routie/index.d.ts @@ -4,15 +4,6 @@ // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped declare namespace routie { - interface Route { - constructor(path: string, name: string): Route; - addHandler(fn: Function): void; - removeHandler(fn: Function): void; - run(params: any): void; - match(path: string, params: any): boolean; - toURL(params: any): string; - } - interface Routie extends RoutieStatic { (path: string): void; (path: string, fn: Function): void; diff --git a/types/rx-angular/index.d.ts b/types/rx-angular/index.d.ts index 6b4fbbe447..d234a0f998 100644 --- a/types/rx-angular/index.d.ts +++ b/types/rx-angular/index.d.ts @@ -13,9 +13,7 @@ declare namespace Rx { safeApply($scope: ng.IScope, callback: (data: T) => void): Rx.Observable; } - export interface ScopeScheduler extends IScheduler { - constructor(scope: ng.IScope) : ScopeScheduler; - } + export interface ScopeScheduler extends IScheduler {} export interface ScopeSchedulerStatic extends SchedulerStatic { new ($scope: angular.IScope): ScopeScheduler; diff --git a/types/stacktrace-js/index.d.ts b/types/stacktrace-js/index.d.ts index 96be8bfbf5..30baf18045 100644 --- a/types/stacktrace-js/index.d.ts +++ b/types/stacktrace-js/index.d.ts @@ -22,8 +22,8 @@ declare namespace StackTrace { offline?: boolean; } - export interface StackFrame { - constructor(functionName: string, args: any, fileName: string, lineNumber: number, columnNumber: number): StackFrame; + export class StackFrame { + constructor(functionName: string, args: any, fileName: string, lineNumber: number, columnNumber: number); functionName: string; args: any; diff --git a/types/stream-meter/index.d.ts b/types/stream-meter/index.d.ts index d95d954e51..1c7518398b 100644 --- a/types/stream-meter/index.d.ts +++ b/types/stream-meter/index.d.ts @@ -10,8 +10,8 @@ import { Transform } from 'stream'; declare function m(maxBytes?: number): m.StreamMeter; declare namespace m { - export interface StreamMeter extends Transform { - constructor(maxBytes?: number): StreamMeter; + export class StreamMeter extends Transform { + constructor(maxBytes?: number); bytes: number; maxBytes: number; }