Socket
Socket
Sign inDemoInstall

@types/nprogress

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/nprogress - npm Package Compare versions

Comparing version 0.0.29 to 0.2.0

nprogress/LICENSE

143

nprogress/index.d.ts

@@ -1,116 +0,45 @@

// Type definitions for NProgress
// Type definitions for NProgress 0.2
// Project: https://github.com/rstacruz/nprogress
// Definitions by: Judah Gabriel Himango <http://debuggerdotbreak.wordpress.com>
// Definitions by: Judah Gabriel Himango <https://github.com/JudahGabriel>, Ovyerus <https://github.com/Ovyerus>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1
interface NProgressStatic {
/**
* Shows the progress bar and begins trickling progress.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
start(): NProgressStatic;
declare namespace nProgress {
interface NProgressOptions {
minimum: number;
template: string;
easing: string;
speed: number;
trickle: boolean;
trickleSpeed: number;
showSpinner: boolean;
parent: string;
positionUsing: string;
barSelector: string;
spinnerSelector: string;
}
/**
* Finishes loading by transitioning it to 100%, then fading out.
* @param {boolean} forceShow Forces the progress bar to show, even if it's not being shown. (The default behavior is that .done() will not do anything if .start() isn't called.)
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
done(forceShow?: boolean): NProgressStatic;
interface NProgress {
version: string;
settings: NProgressOptions;
status: number | null;
/**
* Increments the progress bar with a random amount. This will never get to 100%: use it for every image load (or similar).
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
inc(): NProgressStatic;
configure(options: Partial<NProgressOptions>): NProgress;
set(number: number): NProgress;
isStarted(): boolean;
start(): NProgress;
done(force?: boolean): NProgress;
inc(amount?: number): NProgress;
trickle(): NProgress;
/**
* Increments the progress bar with a set amount.
* @param {number} amount This will get the current status value and adds the value until status is max 0.994
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
inc(amount: number): NProgressStatic;
/* Internal */
/**
* Removes the progress indicator.
*/
remove(): void;
/**
* Sets the progress percentage.
* @param {number} progressPercent A number between 0.0 and 1.0 that represents the progress percentage.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
set(progressPercent: number): NProgressStatic;
/**
* Configures the progress indicator.
* @param {NProgressConfigureOptions} options An object containing the configuration options.
* @returns {NProgressConfigureOptions} The current NProgress object, useful for chaining.
*/
configure(options: NProgressConfigureOptions): NProgressStatic;
/**
* Gets the NProgress version.
*/
version: string;
/**
* Gets the status. If started, it will be the last progress number set.
*/
status: any;
/**
* Gets whether progress has been started.
* @returns {boolean} Whether the progress has started.
*/
isStarted(): boolean;
render(fromStart?: boolean): HTMLDivElement;
remove(): void;
isRendered(): boolean;
getPositioningCSS(): 'translate3d' | 'translate' | 'margin';
}
}
interface NProgressConfigureOptions {
/**
* CSS selector to change the parent DOM element of the progress. Default is body.
*/
parent?: string
/**
* The minimum progress percentage. Default is 0.08.
*/
minimum?: number;
/**
* How often to trickle, in milliseconds. Default is 800.
*/
trickleSpeed?: number;
/**
* Whether to show the spinner. Defaults to true. Default is true.
*/
showSpinner?: boolean;
/**
* Whether to enable trickling the progress. Default is true.
*/
trickle?: boolean;
/**
* The CSS easing animation to use. Default is 'linear'.
*/
easing?: string;
/**
* The animation speed in milliseconds. Default is 200.
*/
speed?: number;
/**
* The HTML markup inserted for the progress indicator. To keep the progress bar working, keep an element with role='bar' in there.
*/
template?: string;
}
declare var NProgress: NProgressStatic;
declare module "nprogress" {
export = NProgress;
}
declare const nProgress: nProgress.NProgress;
export = nProgress;
{
"name": "@types/nprogress",
"version": "0.0.29",
"version": "0.2.0",
"description": "TypeScript definitions for NProgress",
"license": "MIT",
"author": "Judah Gabriel Himango <http://debuggerdotbreak.wordpress.com>",
"contributors": [
{
"name": "Judah Gabriel Himango",
"url": "https://github.com/JudahGabriel",
"githubUsername": "JudahGabriel"
},
{
"name": "Ovyerus",
"url": "https://github.com/Ovyerus",
"githubUsername": "Ovyerus"
}
],
"main": "",
"types": "index",
"repository": {
"type": "git",
"url": "https://www.github.com/DefinitelyTyped/DefinitelyTyped.git"
"url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git",
"directory": "types/nprogress"
},
"scripts": {},
"dependencies": {},
"peerDependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "8b13d3bc49df0a259af88c5de2c9a2d126b9b24b0b4d281d4a7e95392c799cc4"
"typesPublisherContentHash": "629416f2837e50179425589c6ed9b12e667e58d75072a835def60cc4ed592e8c",
"typeScriptVersion": "2.1"
}

@@ -5,15 +5,13 @@ # Installation

# Summary
This package contains type definitions for NProgress (https://github.com/rstacruz/nprogress).
This package contains type definitions for NProgress ( https://github.com/rstacruz/nprogress ).
# Details
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/nprogress
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nprogress
Additional Details
* Last updated: Wed, 05 Oct 2016 20:53:36 GMT
* File structure: Mixed
* Library Dependencies: none
* Module Dependencies: none
* Global values: NProgress
* Last updated: Fri, 31 May 2019 21:26:32 GMT
* Dependencies: none
* Global values: none
# Credits
These definitions were written by Judah Gabriel Himango <http://debuggerdotbreak.wordpress.com>.
These definitions were written by Judah Gabriel Himango <https://github.com/JudahGabriel>, Ovyerus <https://github.com/Ovyerus>.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc