mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Fixing unreachable method overloads (#39000)
* remove unreachable overload reflect in bluebird * remove duplicate of method toggleDisabled * remove duplicate of mehtod hsl * remove wrong overload of getType in ContentBlock * remove duplicate of getActiveFiles * remove duplicate of isMounted * remove duplicate of distinct * flip the other of the flatten overloads in highland to make both overloads useable * removed 3 duplicate methods * flip the order of two overloads in Lodash such that both overloads can be used * remove superfluous overload that made the more general overload unreachable * remove second useless overload a bunch of times * remove a bunch of duplicate methods * refactored the authenticate method such that both overloads can be used * remove duplcate overload * removed a bunch of superfluous method overloads * removed invalid duplicate method overload * remove duplicate method overload * change passport-local-mongoose to use TypeScript 3.0 to handle unknown type in dependency * revert change to Lodash.fromPairs * made formatting match the old formatting
This commit is contained in:
committed by
Andrew Branch
parent
2d75b571cf
commit
fba5930a98
Vendored
-1
@@ -341,7 +341,6 @@ declare class Bluebird<R> implements PromiseLike<R>, Bluebird.Inspection<R> {
|
||||
* the promise as snapshotted at the time of calling `.reflect()`.
|
||||
*/
|
||||
reflect(): Bluebird<Bluebird.Inspection<R>>;
|
||||
reflect(): Bluebird<Bluebird.Inspection<any>>;
|
||||
|
||||
/**
|
||||
* This is a convenience method for doing:
|
||||
|
||||
Vendored
-1
@@ -61,7 +61,6 @@ declare namespace BootstrapSwitch {
|
||||
animate(state: boolean): JQuery;
|
||||
disabled(): boolean;
|
||||
disabled(state: boolean): JQuery;
|
||||
toggleDisabled(): JQuery;
|
||||
readonly(): boolean;
|
||||
readonly(state: boolean): JQuery;
|
||||
toggleReadOnly(): JQuery;
|
||||
|
||||
Vendored
-1
@@ -92,7 +92,6 @@ declare namespace Color {
|
||||
opaquer(value: number): Color;
|
||||
rotate(value: number): Color;
|
||||
mix(color: Color, value?: number): Color;
|
||||
hsl(): Color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
-1
@@ -753,7 +753,6 @@ declare namespace Draft {
|
||||
getKey(): string;
|
||||
|
||||
getType(): DraftBlockType;
|
||||
getType(): string;
|
||||
|
||||
getText(): string;
|
||||
getCharacterList(): Immutable.List<CharacterMetadata>;
|
||||
|
||||
Vendored
-2
@@ -215,8 +215,6 @@ declare class Dropzone {
|
||||
|
||||
accept(file: Dropzone.DropzoneFile, done: (error?: string | Error) => void): void;
|
||||
|
||||
getActiveFiles(): Dropzone.DropzoneFile[];
|
||||
|
||||
getFilesWithStatus(status: string): Dropzone.DropzoneFile[];
|
||||
|
||||
enqueueFile(file: Dropzone.DropzoneFile): void;
|
||||
|
||||
Vendored
-1
@@ -34,7 +34,6 @@ declare module "famous/core" {
|
||||
removeChild(node: Node): boolean;
|
||||
getParent(): Node;
|
||||
|
||||
isMounted(): boolean;
|
||||
mount(): void;
|
||||
dismount(): void;
|
||||
|
||||
|
||||
Vendored
-1
@@ -37,7 +37,6 @@ declare namespace FromJS {
|
||||
toArray(): Array<T>;
|
||||
concat(second: Array<T>): IQueryable<T>;
|
||||
sum(): T;
|
||||
distinct(): IQueryable<T>;
|
||||
any(): boolean;
|
||||
any(predicate: (item: T) => boolean): boolean;
|
||||
all(predicate: (item: T) => boolean): boolean;
|
||||
|
||||
Vendored
+1
-1
@@ -1021,8 +1021,8 @@ declare namespace Highland {
|
||||
* @name Stream.flatten()
|
||||
* @api public
|
||||
*/
|
||||
flatten<U>(): Stream<U>;
|
||||
flatten(): Stream<R>;
|
||||
flatten<U>(): Stream<U>;
|
||||
|
||||
/**
|
||||
* Forks a stream, allowing you to add additional consumers with shared
|
||||
|
||||
Vendored
-4
@@ -1896,7 +1896,6 @@ declare namespace kendo.ui {
|
||||
navigateToPast(): void;
|
||||
navigateUp(): void;
|
||||
selectDates(): void;
|
||||
selectDates(): void;
|
||||
value(): Date;
|
||||
value(value: Date): void;
|
||||
value(value: string): void;
|
||||
@@ -10646,7 +10645,6 @@ declare namespace kendo.dataviz.ui {
|
||||
svg(): void;
|
||||
imageDataURL(): string;
|
||||
value(): void;
|
||||
value(): void;
|
||||
|
||||
}
|
||||
|
||||
@@ -18376,8 +18374,6 @@ declare namespace kendo.dataviz {
|
||||
|
||||
|
||||
select(): any;
|
||||
select(): void;
|
||||
|
||||
}
|
||||
|
||||
interface NavigatorOptions {
|
||||
|
||||
Vendored
-1
@@ -5,6 +5,5 @@ export type Loader = (p0: (p0?: Error) => void) => void;
|
||||
export default class ImageCanvas extends ImageBase {
|
||||
constructor(extent: Extent, resolution: number, pixelRatio: number, canvas: HTMLCanvasElement, opt_loader?: Loader);
|
||||
getError(): Error;
|
||||
getImage(): HTMLCanvasElement;
|
||||
getImage(): HTMLCanvasElement | HTMLImageElement | HTMLVideoElement;
|
||||
}
|
||||
|
||||
Vendored
-1
@@ -23,7 +23,6 @@ export default class ImageLayer extends Layer {
|
||||
constructor(opt_options?: Options);
|
||||
protected type: LayerType;
|
||||
getSource(): ImageSource;
|
||||
getSource(): Source;
|
||||
on(type: string | string[], listener: (p0: any) => void): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: (p0: any) => void): EventsKey | EventsKey[];
|
||||
un(type: string | string[], listener: (p0: any) => void): void;
|
||||
|
||||
Vendored
-1
@@ -26,7 +26,6 @@ export default class TileLayer extends Layer {
|
||||
protected type: LayerType;
|
||||
getPreload(): number;
|
||||
getSource(): TileSource;
|
||||
getSource(): Source;
|
||||
getUseInterimTilesOnError(): boolean;
|
||||
setPreload(preload: number): void;
|
||||
setUseInterimTilesOnError(useInterimTilesOnError: boolean): void;
|
||||
|
||||
Vendored
-1
@@ -38,7 +38,6 @@ export default class VectorLayer extends Layer {
|
||||
getRenderMode(): VectorRenderType | string;
|
||||
getRenderOrder(): (p0: Feature, p1: Feature) => number | null | undefined;
|
||||
getSource(): VectorSource;
|
||||
getSource(): Source;
|
||||
getStyle(): StyleLike | null | undefined;
|
||||
getStyleFunction(): StyleFunction | undefined;
|
||||
getUpdateWhileAnimating(): boolean;
|
||||
|
||||
Vendored
-1
@@ -35,7 +35,6 @@ export default class VectorTileLayer extends VectorLayer {
|
||||
constructor(opt_options?: Options);
|
||||
protected type: LayerType;
|
||||
getPreload(): number;
|
||||
getSource(): VectorTile;
|
||||
getSource(): VectorSource;
|
||||
getUseInterimTilesOnError(): boolean;
|
||||
setPreload(preload: number): void;
|
||||
|
||||
-1
@@ -22,7 +22,6 @@ export default class CanvasTileLayerRenderer extends IntermediateCanvasRenderer
|
||||
handles(layer: Layer): boolean;
|
||||
drawTileImage(tile: Tile, frameState: FrameState, layerState: State, x: number, y: number, w: number, h: number, gutter: number, transition: boolean): void;
|
||||
getLayer(): TileLayer | VectorTileLayer;
|
||||
getLayer(): Layer;
|
||||
getTile(z: number, x: number, y: number, pixelRatio: number, projection: Projection): Tile;
|
||||
on(type: string | string[], listener: (p0: any) => void): EventsKey | EventsKey[];
|
||||
once(type: string | string[], listener: (p0: any) => void): EventsKey | EventsKey[];
|
||||
|
||||
Vendored
-1
@@ -25,7 +25,6 @@ export interface Options {
|
||||
export default class Icon extends ImageStyle {
|
||||
constructor(opt_options?: Options);
|
||||
clone(): Icon;
|
||||
clone(): ImageStyle;
|
||||
getColor(): Color;
|
||||
getSrc(): string | undefined;
|
||||
setAnchor(anchor: number[]): void;
|
||||
|
||||
Vendored
-1
@@ -32,7 +32,6 @@ export default class RegularShape extends ImageStyle {
|
||||
protected radius_: number;
|
||||
protected render_(atlasManager: AtlasManager | undefined): void;
|
||||
clone(): RegularShape;
|
||||
clone(): ImageStyle;
|
||||
getAngle(): number;
|
||||
getChecksum(): string;
|
||||
getFill(): Fill;
|
||||
|
||||
Vendored
-51
@@ -1511,12 +1511,6 @@ declare namespace sap {
|
||||
constructor(extensionObject: any);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Calls the static emptyQueue function in the Opa namespace {@link sap.ui.test.Opa#.emptyQueue}
|
||||
*/
|
||||
emptyQueue(): void;
|
||||
|
||||
/**
|
||||
* Waits until all waitFor calls are done.
|
||||
* @returns If the waiting was successful, the promise will be resolved. If not it will be rejected
|
||||
@@ -1543,14 +1537,6 @@ declare namespace sap {
|
||||
*/
|
||||
extendConfig(options: any): void;
|
||||
|
||||
/**
|
||||
* Gives access to a singleton object you can save values in.This object will only be created once and
|
||||
* it will never be destroyed.That means you can use it to save values you need in multiple separated
|
||||
* tests.
|
||||
* @returns the context object
|
||||
*/
|
||||
getContext(): any;
|
||||
|
||||
/**
|
||||
* Gives access to a singleton object you can save values in.Same as {@link sap.ui.test.Opa#getContext}
|
||||
* @since 1.29.0
|
||||
@@ -1717,12 +1703,6 @@ declare namespace sap {
|
||||
*/
|
||||
iTeardownMyAppFrame(): any;
|
||||
|
||||
/**
|
||||
* Removes the IFrame from the DOM and removes all the references to its objects
|
||||
* @returns A promise that gets resolved on success
|
||||
*/
|
||||
iTeardownMyAppFrame(): any;
|
||||
|
||||
/**
|
||||
* Destroys the UIComponent and removes the div from the dom like all the references on its objects
|
||||
* @returns a promise that gets resolved on success.
|
||||
@@ -2812,12 +2792,6 @@ declare namespace sap {
|
||||
*/
|
||||
getMetadata(): sap.ui.base.Metadata;
|
||||
|
||||
/**
|
||||
* Returns the metadata for the ManagedObject class.
|
||||
* @returns Metadata for the ManagedObject class.
|
||||
*/
|
||||
getMetadata(): sap.ui.base.Metadata;
|
||||
|
||||
/**
|
||||
* Get the model to be used for data bindings with the given model name.If the object does not have a
|
||||
* model set on itself, it will use the firstmodel defined in its parent hierarchy.The name can be
|
||||
@@ -9511,11 +9485,6 @@ declare namespace sap {
|
||||
*/
|
||||
getLastZIndex(): Number;
|
||||
|
||||
/**
|
||||
* Returns the last z-index that has been handed out. does not increase the internal z-index counter.
|
||||
*/
|
||||
getLastZIndex(): Number;
|
||||
|
||||
/**
|
||||
* Returns a metadata object for class sap.ui.core.Popup.
|
||||
* @returns Metadata object describing this class
|
||||
@@ -9534,13 +9503,6 @@ declare namespace sap {
|
||||
*/
|
||||
getNextZIndex(): Number;
|
||||
|
||||
/**
|
||||
* Returns the next available z-index on top of the existing/previous popups. Each call increases the
|
||||
* internal z-index counter and the returned z-index.
|
||||
* @returns the next z-index on top of the Popup stack
|
||||
*/
|
||||
getNextZIndex(): Number;
|
||||
|
||||
/**
|
||||
* Returns whether the Popup is currently open, closed, or transitioning between these states.
|
||||
* @returns whether the Popup is opened
|
||||
@@ -10341,13 +10303,6 @@ declare namespace sap {
|
||||
*/
|
||||
getLayoutData(): sap.ui.core.LayoutData;
|
||||
|
||||
/**
|
||||
* Returns the runtime metadata for this UI element.When using the defineClass method, this function is
|
||||
* automatically created and returnsa runtime representation of the design time metadata.
|
||||
* @returns runtime metadata
|
||||
*/
|
||||
getMetadata(): any;
|
||||
|
||||
/**
|
||||
* Returns a metadata object for class sap.ui.core.Element.
|
||||
* @returns Metadata object describing this class
|
||||
@@ -11416,12 +11371,6 @@ declare namespace sap {
|
||||
*/
|
||||
getMetadata(): sap.ui.base.Metadata;
|
||||
|
||||
/**
|
||||
* Returns the metadata for the Component class.
|
||||
* @returns Metadata for the Component class.
|
||||
*/
|
||||
getMetadata(): sap.ui.base.Metadata;
|
||||
|
||||
/**
|
||||
* Returns the Component instance in whose "context" the given ManagedObject has been createdor
|
||||
* <code>undefined</code>.This is a convenience wrapper around {@link
|
||||
|
||||
+7
-3
@@ -2,7 +2,7 @@
|
||||
// Project: https://github.com/saintedlama/passport-local-mongoose
|
||||
// Definitions by: Linus Brolin <https://github.com/linusbrolin>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
/// <reference types="mongoose" />
|
||||
/// <reference types="passport-local" />
|
||||
@@ -27,10 +27,14 @@ declare module 'mongoose' {
|
||||
resetAttempts(cb: (err: any, res: any) => void): void;
|
||||
}
|
||||
|
||||
interface AuthenticateMethod<T> {
|
||||
(username: string, password: string): Promise<AuthenticationResult>;
|
||||
(username: string, password: string, cb: (err: any, user: T | boolean, error: any) => void): void;
|
||||
}
|
||||
|
||||
// statics
|
||||
interface PassportLocalModel<T extends Document> extends Model<T> {
|
||||
authenticate(): (username: string, password: string) => Promise<AuthenticationResult>;
|
||||
authenticate(): (username: string, password: string, cb: (err: any, user: T | boolean, error: any) => void) => void;
|
||||
authenticate(): AuthenticateMethod<T>
|
||||
serializeUser(): (user: PassportLocalModel<T>, cb: (err: any, id?: any) => void) => void;
|
||||
deserializeUser(): (username: string, cb: (err: any, user?: any) => void) => void;
|
||||
|
||||
|
||||
Vendored
-2
@@ -193,8 +193,6 @@ declare global {
|
||||
|
||||
createdCallback?():void;
|
||||
|
||||
attachedCallback?():void;
|
||||
|
||||
detachedCallback?():void;
|
||||
|
||||
attributeChangedCallback?(name: string):void;
|
||||
|
||||
-1
@@ -71,7 +71,6 @@ declare namespace TestUtils {
|
||||
|
||||
export interface ShallowRenderer {
|
||||
getRenderOutput<E extends ReactElement>(): E;
|
||||
getRenderOutput(): ReactElement;
|
||||
render(element: ReactElement, context?: any): void;
|
||||
unmount(): void;
|
||||
}
|
||||
|
||||
-4
@@ -67,10 +67,6 @@ export interface ShallowRenderer {
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput<E extends ReactElement>(): E;
|
||||
/**
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput(): ReactElement;
|
||||
/**
|
||||
* Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
|
||||
*/
|
||||
|
||||
-4
@@ -67,10 +67,6 @@ export interface ShallowRenderer {
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput<E extends ReactElement>(): E;
|
||||
/**
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput(): ReactElement;
|
||||
/**
|
||||
* Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
|
||||
*/
|
||||
|
||||
@@ -9,10 +9,6 @@ export interface ShallowRenderer {
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput<E extends ReactElement>(): E;
|
||||
/**
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput(): ReactElement;
|
||||
/**
|
||||
* Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
|
||||
*/
|
||||
|
||||
@@ -5,10 +5,6 @@ export interface ShallowRenderer {
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput<E extends ReactElement>(): E;
|
||||
/**
|
||||
* After `shallowRenderer.render()` has been called, returns shallowly rendered output.
|
||||
*/
|
||||
getRenderOutput(): ReactElement;
|
||||
/**
|
||||
* Similar to `ReactDOM.render` but it doesn't require DOM and only renders a single level deep.
|
||||
*/
|
||||
|
||||
Vendored
-1
@@ -110,7 +110,6 @@ interface WebPage {
|
||||
childFramesCount(): number; // DEPRECATED
|
||||
childFramesName(): string; // DEPRECATED
|
||||
clearCookies(): void;
|
||||
close(): Promise<void>;
|
||||
close(): void;
|
||||
currentFrameName(): string; // DEPRECATED
|
||||
deleteCookie(cookieName: string): boolean;
|
||||
|
||||
Vendored
-6
@@ -39,12 +39,6 @@ declare class Vec2 {
|
||||
*/
|
||||
zero(): Vec2;
|
||||
|
||||
/**
|
||||
* Returns a clone of this vector.
|
||||
* _Note_: this does not clone observers
|
||||
*/
|
||||
zero(): Vec2;
|
||||
|
||||
/**
|
||||
* Negate the `x` and `y` coords of this vector. If `returnNew` is truthy, a new vector with the negated coordinates will be returned.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user