@types/mockjs
- Version 1.0.10
- Published
- 9.95 kB
- No dependencies
- MIT license
Install
npm i @types/mockjs
yarn add @types/mockjs
pnpm add @types/mockjs
Overview
TypeScript definitions for mockjs
Index
Variables
Interfaces
Type Aliases
Variables
Interfaces
interface Mockjs
interface Mockjs {}
interface MockjsMock
interface MockjsMock {}
call signature
(rurl: S | RegExp, rtype: S, template: templateOrFn): Mockjs;
call signature
(rurl: S | RegExp, template: templateOrFn): Mockjs;
call signature
(template: any): any;
interface MockjsRandom
interface MockjsRandom extends MockjsRandomBasic, MockjsRandomDate, MockjsRandomImage, MockjsRandomColor, MockjsRandomAddress, MockjsRandomHelper, MockjsRandomMiscellaneous, MockjsRandomName, MockjsRandomText, MockjsRandomWeb, MockjsRandomExtendOption {}
method extend
extend: (extendOption: MockjsRandomExtendOption) => MockjsRandom;
interface MockjsRandomAddress
interface MockjsRandomAddress {}
interface MockjsRandomBasic
interface MockjsRandomBasic {}
method boolean
boolean: { (min: N, max: N, current: B): B; (): boolean };
method character
character: { (pool: 'lower' | 'upper' | 'number' | 'symbol'): S; (pool?: string): string;};
method float
float: (min?: N, max?: N, dmin?: N, dmax?: N) => N;
method integer
integer: (min?: N, max?: N) => N;
method natural
natural: (min?: N, max?: N) => N;
method range
range: (start?: N, stop?: N, step?: N) => N[];
method string
string: (pool?: S | N, min?: N, max?: N) => S;
interface MockjsRandomColor
interface MockjsRandomColor {}
interface MockjsRandomDate
interface MockjsRandomDate {}
interface MockjsRandomExtendOption
interface MockjsRandomExtendOption {}
index signature
[randomType: string]: (...args: any[]) => any;
interface MockjsRandomHelper
interface MockjsRandomHelper {}
method capitalize
capitalize: (word: S) => S;
method lower
lower: (str: S) => S;
method pick
pick: (arr: any[]) => any;
method shuffle
shuffle: (arr: any[]) => any[];
method upper
upper: (str: S) => S;
interface MockjsRandomImage
interface MockjsRandomImage {}
interface MockjsRandomMiscellaneous
interface MockjsRandomMiscellaneous {}
interface MockjsRandomName
interface MockjsRandomName {}
interface MockjsRandomText
interface MockjsRandomText {}
method cparagraph
cparagraph: (min?: N, max?: N) => S;
method csentence
csentence: (min?: N, max?: N) => S;
method ctitle
ctitle: (min?: N, max?: N) => S;
method cword
cword: (pool?: S | N, min?: N, max?: N) => S;
method paragraph
paragraph: (min?: N, max?: N) => S;
method sentence
sentence: (min?: N, max?: N) => S;
method title
title: (min?: N, max?: N) => S;
method word
word: (min?: N, max?: N) => S;
interface MockjsRandomWeb
interface MockjsRandomWeb {}
interface MockjsRequestOptions
interface MockjsRequestOptions {}
interface MockjsSetupSettings
interface MockjsSetupSettings {}
property timeout
timeout?: number | S | undefined;
interface MockjsToJSONSchemaRs
interface MockjsToJSONSchemaRs {}
Type Aliases
type B
type B = boolean;
type MockjsSetup
type MockjsSetup = (settings: MockjsSetupSettings) => void;
type MockjsToJSONSchema
type MockjsToJSONSchema = (template: any) => MockjsToJSONSchemaRs;
type MockjsValid
type MockjsValid = (template: any, data: any) => MockjsValidRsItem[];
type N
type N = number;
type RandomDateUtilString
type RandomDateUtilString = | 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second' | 'week';
type RandomImageFormatString
type RandomImageFormatString = 'png' | 'gif' | 'jpg';
type RandomWebProtocal
type RandomWebProtocal = | 'http' | 'ftp' | 'gopher' | 'mailto' | 'mid' | 'cid' | 'news' | 'nntp' | 'prospero' | 'telnet' | 'rlogin' | 'tn3270' | 'wais';
type S
type S = string;
type templateOrFn
type templateOrFn = ((options: MockjsRequestOptions) => any) | object;
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/mockjs
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/mockjs)
- HTML<a href="https://www.jsdocs.io/package/@types/mockjs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 2896 ms. - Missing or incorrect documentation? Open an issue for this package.