typemoq
- Version 2.1.0
- Published
- 3 dependencies
- MIT license
Install
npm i typemoq
yarn add typemoq
pnpm add typemoq
Overview
A simple mocking library for TypeScript
Index
Namespaces
typemoq/_all
- BaseInvocation
- CallType
- Ctor
- CtorWithArgs
- DynamicGetInvocation
- Exception
- ExpectedCallType
- IAction
- IAction1
- IActionN
- ICallback
- ICallContext
- ICallInterceptor
- IFunc1
- IFunc2
- IFuncN
- IGlobalMock
- IMatch
- IMock
- InvocationType
- IPropertyInfo
- IProxy
- IProxyCall
- IReturns
- IReturnsResult
- IReturnsThrows
- ISetup
- IThrows
- IThrowsResult
- IUsingResult
- IVerifies
- Match
- MatchAny
- MatchAnyNumber
- MatchAnyObject
- MatchAnyString
- MatchObjectWith
- MatchPred
- MatchValue
- MethodGetterInvocation
- MethodInfo
- MethodInvocation
- MethodSetterInvocation
- MockBehavior
- MockException
- MockExceptionReason
- PropDescriptor
- PropDescriptorMap
- PropertyInfo
- PropertyRetriever
- ProxyES5
- ProxyES6
- ProxyFactory
- ProxyType
- Times
- Utils
- ValueGetterInvocation
- ValueSetterInvocation
Namespaces
namespace typemoq
module 'typemoq' {}
class GlobalMock
class GlobalMockApi {}
method ofInstance
static ofInstance: <U>( targetInstance: U, globalName?: string, container?: Object, behavior?: MockBehavior) => IGlobalMock<U>;
method ofType
static ofType: <U>( targetConstructor: common.Ctor<U>, container?: Object, behavior?: MockBehavior) => IGlobalMock<U>;
method ofType2
static ofType2: <U>( globalName: string, container?: Object, behavior?: MockBehavior) => IGlobalMock<U>;
class GlobalScope
class GlobalScopeApi {}
method using
static using: (...args: all.IGlobalMock<any>[]) => IUsingResult;
class It
class It {}
method is
static is: <T>(predicate: common.IFunc2<T, boolean>) => T;
method isAny
static isAny: () => any;
method isAnyNumber
static isAnyNumber: () => number;
method isAnyObject
static isAnyObject: <T>(x: common.Ctor<T>) => T;
method isAnyString
static isAnyString: () => string;
method isObjectWith
static isObjectWith: <T>(x: { [P in keyof T]?: T[P] }) => T;
method isValue
static isValue: <T>(x: T) => T;
class Mock
class MockApi {}
method ofInstance
static ofInstance: <U>( targetInstance: U, behavior?: MockBehavior, shouldOverrideTarget?: boolean) => IMock<U>;
method ofType
static ofType: <U>( targetConstructor?: common.CtorWithArgs<U>, behavior?: MockBehavior, shouldOverrideTarget?: boolean, ...targetConstructorArgs: any[]) => IMock<U>;
method ofType2
static ofType2: <U>( targetConstructor: common.CtorWithArgs<U>, targetConstructorArgs: any[], behavior?: MockBehavior, shouldOverrideTarget?: boolean) => IMock<U>;
class MockException
class MockException extends Exception {}
constructor
constructor(reason: number, ctx: any, message?: string);
property ctx
readonly ctx: any;
property message
readonly message: string;
property reason
readonly reason: number;
method toString
toString: () => string;
class Times
class Times {}
property max
readonly max: number;
property min
readonly min: number;
method atLeast
static atLeast: (n: number) => Times;
method atLeastOnce
static atLeastOnce: () => Times;
method atMost
static atMost: (n: number) => Times;
method atMostOnce
static atMostOnce: () => Times;
method exactly
static exactly: (n: number) => Times;
method failMessage
failMessage: (call: proxy.ICallContext) => string;
method never
static never: () => Times;
method once
static once: () => Times;
method toString
toString: () => string;
method verify
verify: (callCount: number) => boolean;
interface IGlobalMock
interface IGlobalMock<T> extends IMock<T> {}
interface IMock
interface IMock<T> {}
property behavior
readonly behavior: MockBehavior;
property callBase
callBase: boolean;
property name
readonly name: string;
property object
readonly object: T;
property target
readonly target: T;
method reset
reset: () => void;
method setup
setup: <TResult>( expression: common.IFunc2<T, TResult>) => MethodCallReturn<T, TResult>;
method verify
verify: <TResult>(expression: common.IFunc2<T, TResult>, times: Times) => void;
method verifyAll
verifyAll: () => void;
enum ExpectedCallType
enum ExpectedCallType { InAnyOrder = 0, InSequence = 1,}
member InAnyOrder
InAnyOrder = 0
member InSequence
InSequence = 1
enum MockBehavior
enum MockBehavior { Loose = 0, Strict = 1,}
namespace typemoq/_all
module 'typemoq/_all' {}
class BaseInvocation
abstract class BaseInvocation implements ICallContext {}
constructor
constructor(proxyType: ProxyType, callType: CallType);
property args
abstract args: IArguments;
property callType
callType: CallType;
property invocationType
invocationType: InvocationType;
property isAnUnknownDynamicCallAtExecution
readonly isAnUnknownDynamicCallAtExecution: boolean;
property property
abstract readonly property: IPropertyInfo;
property proxyType
readonly proxyType: ProxyType;
property returnValue
returnValue: any;
method invokeBase
abstract invokeBase: () => void;
class DynamicGetInvocation
class DynamicGetInvocation extends ValueGetterInvocation {}
constructor
constructor(property: IPropertyInfo, value: any);
class Exception
class Exception extends Error {}
constructor
constructor(name: string, message: string);
property name
name: string;
method toString
toString: () => string;
class MatchAnyNumber
class MatchAnyNumber implements IMatch {}
method toString
toString: () => string;
class MatchAnyObject
class MatchAnyObject<T> implements IMatch {}
constructor
constructor(_ctor: common.Ctor<T>);
method toString
toString: () => string;
class MatchAnyString
class MatchAnyString implements IMatch {}
method toString
toString: () => string;
class MatchObjectWith
class MatchObjectWith<T> implements IMatch {}
constructor
constructor(value: {});
method toString
toString: () => string;
class MatchPred
class MatchPred<T> implements IMatch {}
constructor
constructor(_pred: common.IFunc2<T, boolean>);
method toString
toString: () => string;
class MatchValue
class MatchValue<T> implements IMatch {}
constructor
constructor(value: {});
method toString
toString: () => string;
class MethodGetterInvocation
class MethodGetterInvocation extends BaseInvocation {}
constructor
constructor( _property: IPropertyInfo, _getter: () => any, proxyType?: ProxyType, callType?: CallType);
property args
args: IArguments;
property property
readonly property: IPropertyInfo;
method invokeBase
invokeBase: () => void;
method toString
toString: () => string;
class MethodInfo
class MethodInfo implements IPropertyInfo {}
class MethodInvocation
class MethodInvocation extends BaseInvocation {}
constructor
constructor( _that: Object, _property: MethodInfo, args?: IArguments, proxyType?: ProxyType, callType?: CallType);
property args
args: IArguments;
property property
readonly property: IPropertyInfo;
method invokeBase
invokeBase: () => void;
method toString
toString: () => string;
class MethodSetterInvocation
class MethodSetterInvocation extends BaseInvocation {}
constructor
constructor( _property: IPropertyInfo, _setter: (v: any) => void, args: IArguments, proxyType?: ProxyType, callType?: CallType);
property args
args: IArguments;
property property
readonly property: IPropertyInfo;
method invokeBase
invokeBase: () => void;
method toString
toString: () => string;
class MockException
class MockException extends Exception {}
constructor
constructor(reason: number, ctx: any, message?: string);
property ctx
readonly ctx: any;
property message
readonly message: string;
property reason
readonly reason: number;
method toString
toString: () => string;
class PropertyInfo
class PropertyInfo implements IPropertyInfo {}
constructor
constructor(obj: Object, name: string, desc?: common.PropDescriptor);
property desc
readonly desc: common.PropDescriptor;
property name
readonly name: string;
property obj
readonly obj: Object;
method toString
toString: () => string;
class PropertyRetriever
class PropertyRetriever {}
method getOwnAndPrototypeEnumerables
static getOwnAndPrototypeEnumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnAndPrototypeEnumerablesAndNonenumerables
static getOwnAndPrototypeEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnAndPrototypeNonenumerables
static getOwnAndPrototypeNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnEnumerables
static getOwnEnumerables: (obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnEnumerablesAndNonenumerables
static getOwnEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnNonenumerables
static getOwnNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeEnumerables
static getPrototypeEnumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeEnumerablesAndNonenumerables
static getPrototypeEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeNonenumerables
static getPrototypeNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
class ProxyES5
class ProxyES5<T> implements IProxy {}
class ProxyES6
class ProxyES6<T> implements IProxy {}
method of
static of: <U>(target: U, handler: IProxyHandler<U>) => ProxyES6<U>;
class ProxyFactory
class ProxyFactory {}
method createProxy
static createProxy: <T>(target: T, interceptor: ICallInterceptor) => T;
method createProxyES6
static createProxyES6: <T>(target: T, interceptor: ICallInterceptor) => T;
class Times
class Times {}
property max
readonly max: number;
property min
readonly min: number;
method atLeast
static atLeast: (n: number) => Times;
method atLeastOnce
static atLeastOnce: () => Times;
method atMost
static atMost: (n: number) => Times;
method atMostOnce
static atMostOnce: () => Times;
method exactly
static exactly: (n: number) => Times;
method failMessage
failMessage: (call: proxy.ICallContext) => string;
method never
static never: () => Times;
method once
static once: () => Times;
method toString
toString: () => string;
method verify
verify: (callCount: number) => boolean;
class Utils
class Utils {}
method argsName
static argsName: (args: IArguments) => string;
method clone
static clone: (target: Object, source: Object) => void;
method conthunktor
static conthunktor: <U>(ctor: CtorWithArgs<U>, args: any[]) => U;
method functionName
static functionName: (fun: Object) => string;
method objectName
static objectName: (obj: Object) => string;
class ValueGetterInvocation
class ValueGetterInvocation extends BaseInvocation {}
constructor
constructor( _property: IPropertyInfo, value: any, proxyType?: ProxyType, callType?: CallType);
property args
args: IArguments;
property property
readonly property: IPropertyInfo;
property value
readonly value: any;
method invokeBase
invokeBase: () => void;
method toString
toString: () => string;
class ValueSetterInvocation
class ValueSetterInvocation extends BaseInvocation {}
constructor
constructor( _property: IPropertyInfo, args: IArguments, proxyType?: ProxyType, callType?: CallType);
property args
args: IArguments;
property property
readonly property: IPropertyInfo;
method invokeBase
invokeBase: () => void;
method toString
toString: () => string;
interface ICallback
interface ICallback<T, TResult> {}
method callback
callback: { (action: common.IAction): IReturnsThrows<T, TResult>; (action: common.IAction1<T>): IReturnsThrows<T, TResult>;};
interface ICallContext
interface ICallContext {}
property args
args: IArguments;
property callType
callType: CallType;
property invocationType
invocationType: InvocationType;
property isAnUnknownDynamicCallAtExecution
isAnUnknownDynamicCallAtExecution: boolean;
property property
property: IPropertyInfo;
property proxyType
proxyType: ProxyType;
property returnValue
returnValue: any;
method invokeBase
invokeBase: () => void;
interface ICallInterceptor
interface ICallInterceptor {}
method intercept
intercept: (context: ICallContext) => void;
method removeInvocation
removeInvocation: (context: ICallContext) => void;
interface IGlobalMock
interface IGlobalMock<T> extends IMock<T> {}
interface IMatch
interface IMatch {}
interface IMock
interface IMock<T> {}
property behavior
readonly behavior: MockBehavior;
property callBase
callBase: boolean;
property name
readonly name: string;
property object
readonly object: T;
property target
readonly target: T;
method reset
reset: () => void;
method setup
setup: <TResult>( expression: common.IFunc2<T, TResult>) => MethodCallReturn<T, TResult>;
method verify
verify: <TResult>(expression: common.IFunc2<T, TResult>, times: Times) => void;
method verifyAll
verifyAll: () => void;
interface IPropertyInfo
interface IPropertyInfo {}
interface IProxy
interface IProxy {}
interface IProxyCall
interface IProxyCall<T> {}
property callCount
callCount: number;
property expectedCallCount
expectedCallCount: api.Times;
property id
id: string;
property isInSequence
isInSequence: boolean;
property isInvoked
isInvoked: boolean;
property isVerifiable
isVerifiable: boolean;
property setupCall
setupCall: ICallContext;
property setupExpression
setupExpression: common.IAction1<T>;
method evaluatedSuccessfully
evaluatedSuccessfully: () => void;
method execute
execute: (call: ICallContext) => void;
method matches
matches: (call: ICallContext) => boolean;
method setVerifiable
setVerifiable: ( times?: api.Times, expectedCallType?: api.ExpectedCallType) => void;
interface IReturns
interface IReturns<T, TResult> {}
interface IReturnsResult
interface IReturnsResult<T> extends IVerifies {}
interface IReturnsThrows
interface IReturnsThrows<T, TResult> extends IReturns<T, TResult>, IVerifies, IThrows {}
interface ISetup
interface ISetup<T, TResult> extends ICallback<T, TResult>, IReturnsThrows<T, TResult>, IVerifies {}
interface IThrows
interface IThrows {}
method throws
throws: <T extends Error>(exception: T) => IThrowsResult;
interface IThrowsResult
interface IThrowsResult extends IVerifies {}
interface IUsingResult
interface IUsingResult {}
method with
with: (action: common.IAction) => void;
interface IVerifies
interface IVerifies {}
method verifiable
verifiable: (times?: Times) => void;
interface PropDescriptor
interface PropDescriptor {}
property configurable
configurable?: boolean;
property enumerable
enumerable?: boolean;
property value
value?: any;
property writable
writable?: boolean;
method get
get: () => any;
method set
set: (v: any) => void;
interface PropDescriptorMap
interface PropDescriptorMap {}
index signature
[s: string]: PropDescriptor;
enum CallType
enum CallType { UNKNOWN = 0, PROPERTY = 1, FUNCTION = 2,}
enum ExpectedCallType
enum ExpectedCallType { InAnyOrder = 0, InSequence = 1,}
member InAnyOrder
InAnyOrder = 0
member InSequence
InSequence = 1
enum InvocationType
enum InvocationType { NONE = 0, SETUP = 1, EXECUTE = 2,}
enum MockBehavior
enum MockBehavior { Loose = 0, Strict = 1,}
enum MockExceptionReason
enum MockExceptionReason { NoSetup, MoreThanOneSetup, InvalidArg, InvalidSetup, InvalidMatcher, UnknownGlobalType, CallCountVerificationFailed, CallOrderVerificationFailed, InvalidDynamicProxyRuntime,}
member CallCountVerificationFailed
CallCountVerificationFailed
member CallOrderVerificationFailed
CallOrderVerificationFailed
member InvalidArg
InvalidArg
member InvalidDynamicProxyRuntime
InvalidDynamicProxyRuntime
member InvalidMatcher
InvalidMatcher
member InvalidSetup
InvalidSetup
member MoreThanOneSetup
MoreThanOneSetup
member NoSetup
NoSetup
member UnknownGlobalType
UnknownGlobalType
enum ProxyType
enum ProxyType { STATIC = 0, DYNAMIC = 1,}
type Ctor
type Ctor<T> = { new (): T; prototype: Object;};
type CtorWithArgs
type CtorWithArgs<T> = { new (...ctorArgs: any[]): T; prototype: Object;};
type IAction
type IAction = () => void;
type IAction1
type IAction1<T> = (x: T) => void;
type IActionN
type IActionN<T> = (...x: T[]) => void;
type IFunc1
type IFunc1<TResult> = () => TResult;
type IFunc2
type IFunc2<T, TResult> = (x: T) => TResult;
type IFuncN
type IFuncN<T, TResult> = (...x: T[]) => TResult;
namespace typemoq/Api/_all
module 'typemoq/Api/_all' {}
class Times
class Times {}
property max
readonly max: number;
property min
readonly min: number;
method atLeast
static atLeast: (n: number) => Times;
method atLeastOnce
static atLeastOnce: () => Times;
method atMost
static atMost: (n: number) => Times;
method atMostOnce
static atMostOnce: () => Times;
method exactly
static exactly: (n: number) => Times;
method failMessage
failMessage: (call: proxy.ICallContext) => string;
method never
static never: () => Times;
method once
static once: () => Times;
method toString
toString: () => string;
method verify
verify: (callCount: number) => boolean;
interface ICallback
interface ICallback<T, TResult> {}
method callback
callback: { (action: common.IAction): IReturnsThrows<T, TResult>; (action: common.IAction1<T>): IReturnsThrows<T, TResult>;};
interface IGlobalMock
interface IGlobalMock<T> extends IMock<T> {}
interface IMock
interface IMock<T> {}
property behavior
readonly behavior: MockBehavior;
property callBase
callBase: boolean;
property name
readonly name: string;
property object
readonly object: T;
property target
readonly target: T;
method reset
reset: () => void;
method setup
setup: <TResult>( expression: common.IFunc2<T, TResult>) => MethodCallReturn<T, TResult>;
method verify
verify: <TResult>(expression: common.IFunc2<T, TResult>, times: Times) => void;
method verifyAll
verifyAll: () => void;
interface IReturns
interface IReturns<T, TResult> {}
interface IReturnsResult
interface IReturnsResult<T> extends IVerifies {}
interface IReturnsThrows
interface IReturnsThrows<T, TResult> extends IReturns<T, TResult>, IVerifies, IThrows {}
interface ISetup
interface ISetup<T, TResult> extends ICallback<T, TResult>, IReturnsThrows<T, TResult>, IVerifies {}
interface IThrows
interface IThrows {}
method throws
throws: <T extends Error>(exception: T) => IThrowsResult;
interface IThrowsResult
interface IThrowsResult extends IVerifies {}
interface IUsingResult
interface IUsingResult {}
method with
with: (action: common.IAction) => void;
interface IVerifies
interface IVerifies {}
method verifiable
verifiable: (times?: Times) => void;
enum ExpectedCallType
enum ExpectedCallType { InAnyOrder = 0, InSequence = 1,}
member InAnyOrder
InAnyOrder = 0
member InSequence
InSequence = 1
enum MockBehavior
enum MockBehavior { Loose = 0, Strict = 1,}
namespace typemoq/Api/ExpectedCallType
module 'typemoq/Api/ExpectedCallType' {}
enum ExpectedCallType
enum ExpectedCallType { InAnyOrder = 0, InSequence = 1,}
member InAnyOrder
InAnyOrder = 0
member InSequence
InSequence = 1
namespace typemoq/Api/GlobalMockApi
module 'typemoq/Api/GlobalMockApi' {}
class GlobalMockApi
class GlobalMockApi {}
method ofInstance
static ofInstance: <U>( targetInstance: U, globalName?: string, container?: Object, behavior?: MockBehavior) => IGlobalMock<U>;
method ofType
static ofType: <U>( targetConstructor: common.Ctor<U>, container?: Object, behavior?: MockBehavior) => IGlobalMock<U>;
method ofType2
static ofType2: <U>( globalName: string, container?: Object, behavior?: MockBehavior) => IGlobalMock<U>;
namespace typemoq/Api/GlobalScopeApi
module 'typemoq/Api/GlobalScopeApi' {}
class GlobalScopeApi
class GlobalScopeApi {}
method using
static using: (...args: all.IGlobalMock<any>[]) => IUsingResult;
namespace typemoq/Api/ICallback
module 'typemoq/Api/ICallback' {}
namespace typemoq/Api/IGlobalMock
module 'typemoq/Api/IGlobalMock' {}
interface IGlobalMock
interface IGlobalMock<T> extends IMock<T> {}
namespace typemoq/Api/IMock
module 'typemoq/Api/IMock' {}
interface IMock
interface IMock<T> {}
property behavior
readonly behavior: MockBehavior;
property callBase
callBase: boolean;
property name
readonly name: string;
property object
readonly object: T;
property target
readonly target: T;
method reset
reset: () => void;
method setup
setup: <TResult>( expression: common.IFunc2<T, TResult>) => MethodCallReturn<T, TResult>;
method verify
verify: <TResult>(expression: common.IFunc2<T, TResult>, times: Times) => void;
method verifyAll
verifyAll: () => void;
namespace typemoq/Api/IReturns
module 'typemoq/Api/IReturns' {}
interface IReturns
interface IReturns<T, TResult> {}
interface IReturnsResult
interface IReturnsResult<T> extends IVerifies {}
interface IReturnsThrows
interface IReturnsThrows<T, TResult> extends IReturns<T, TResult>, IVerifies, IThrows {}
namespace typemoq/Api/ISetup
module 'typemoq/Api/ISetup' {}
interface ISetup
interface ISetup<T, TResult> extends ICallback<T, TResult>, IReturnsThrows<T, TResult>, IVerifies {}
namespace typemoq/Api/It
module 'typemoq/Api/It' {}
class It
class It {}
method is
static is: <T>(predicate: common.IFunc2<T, boolean>) => T;
method isAny
static isAny: () => any;
method isAnyNumber
static isAnyNumber: () => number;
method isAnyObject
static isAnyObject: <T>(x: common.Ctor<T>) => T;
method isAnyString
static isAnyString: () => string;
method isObjectWith
static isObjectWith: <T>(x: { [P in keyof T]?: T[P] }) => T;
method isValue
static isValue: <T>(x: T) => T;
namespace typemoq/Api/IThrows
module 'typemoq/Api/IThrows' {}
interface IThrows
interface IThrows {}
method throws
throws: <T extends Error>(exception: T) => IThrowsResult;
interface IThrowsResult
interface IThrowsResult extends IVerifies {}
namespace typemoq/Api/IUsing
module 'typemoq/Api/IUsing' {}
interface IUsingResult
interface IUsingResult {}
method with
with: (action: common.IAction) => void;
namespace typemoq/Api/IVerifies
module 'typemoq/Api/IVerifies' {}
interface IVerifies
interface IVerifies {}
method verifiable
verifiable: (times?: Times) => void;
namespace typemoq/Api/MockApi
module 'typemoq/Api/MockApi' {}
class MockApi
class MockApi {}
method ofInstance
static ofInstance: <U>( targetInstance: U, behavior?: MockBehavior, shouldOverrideTarget?: boolean) => IMock<U>;
method ofType
static ofType: <U>( targetConstructor?: common.CtorWithArgs<U>, behavior?: MockBehavior, shouldOverrideTarget?: boolean, ...targetConstructorArgs: any[]) => IMock<U>;
method ofType2
static ofType2: <U>( targetConstructor: common.CtorWithArgs<U>, targetConstructorArgs: any[], behavior?: MockBehavior, shouldOverrideTarget?: boolean) => IMock<U>;
namespace typemoq/Api/MockBehavior
module 'typemoq/Api/MockBehavior' {}
enum MockBehavior
enum MockBehavior { Loose = 0, Strict = 1,}
namespace typemoq/Api/Times
module 'typemoq/Api/Times' {}
class Times
class Times {}
property max
readonly max: number;
property min
readonly min: number;
method atLeast
static atLeast: (n: number) => Times;
method atLeastOnce
static atLeastOnce: () => Times;
method atMost
static atMost: (n: number) => Times;
method atMostOnce
static atMostOnce: () => Times;
method exactly
static exactly: (n: number) => Times;
method failMessage
failMessage: (call: proxy.ICallContext) => string;
method never
static never: () => Times;
method once
static once: () => Times;
method toString
toString: () => string;
method verify
verify: (callCount: number) => boolean;
namespace typemoq/Common/_all
module 'typemoq/Common/_all' {}
class PropertyRetriever
class PropertyRetriever {}
method getOwnAndPrototypeEnumerables
static getOwnAndPrototypeEnumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnAndPrototypeEnumerablesAndNonenumerables
static getOwnAndPrototypeEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnAndPrototypeNonenumerables
static getOwnAndPrototypeNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnEnumerables
static getOwnEnumerables: (obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnEnumerablesAndNonenumerables
static getOwnEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnNonenumerables
static getOwnNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeEnumerables
static getPrototypeEnumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeEnumerablesAndNonenumerables
static getPrototypeEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeNonenumerables
static getPrototypeNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
class Utils
class Utils {}
method argsName
static argsName: (args: IArguments) => string;
method clone
static clone: (target: Object, source: Object) => void;
method conthunktor
static conthunktor: <U>(ctor: CtorWithArgs<U>, args: any[]) => U;
method functionName
static functionName: (fun: Object) => string;
method objectName
static objectName: (obj: Object) => string;
interface PropDescriptor
interface PropDescriptor {}
property configurable
configurable?: boolean;
property enumerable
enumerable?: boolean;
property value
value?: any;
property writable
writable?: boolean;
method get
get: () => any;
method set
set: (v: any) => void;
interface PropDescriptorMap
interface PropDescriptorMap {}
index signature
[s: string]: PropDescriptor;
type Ctor
type Ctor<T> = { new (): T; prototype: Object;};
type CtorWithArgs
type CtorWithArgs<T> = { new (...ctorArgs: any[]): T; prototype: Object;};
type IAction
type IAction = () => void;
type IAction1
type IAction1<T> = (x: T) => void;
type IActionN
type IActionN<T> = (...x: T[]) => void;
type IFunc1
type IFunc1<TResult> = () => TResult;
type IFunc2
type IFunc2<T, TResult> = (x: T) => TResult;
type IFuncN
type IFuncN<T, TResult> = (...x: T[]) => TResult;
namespace typemoq/Common/Ctor
module 'typemoq/Common/Ctor' {}
type Ctor
type Ctor<T> = { new (): T; prototype: Object;};
type CtorWithArgs
type CtorWithArgs<T> = { new (...ctorArgs: any[]): T; prototype: Object;};
namespace typemoq/Common/Func
module 'typemoq/Common/Func' {}
type IAction
type IAction = () => void;
type IAction1
type IAction1<T> = (x: T) => void;
type IActionN
type IActionN<T> = (...x: T[]) => void;
type IFunc1
type IFunc1<TResult> = () => TResult;
type IFunc2
type IFunc2<T, TResult> = (x: T) => TResult;
type IFuncN
type IFuncN<T, TResult> = (...x: T[]) => TResult;
namespace typemoq/Common/PropDescriptor
module 'typemoq/Common/PropDescriptor' {}
interface PropDescriptor
interface PropDescriptor {}
property configurable
configurable?: boolean;
property enumerable
enumerable?: boolean;
property value
value?: any;
property writable
writable?: boolean;
method get
get: () => any;
method set
set: (v: any) => void;
interface PropDescriptorMap
interface PropDescriptorMap {}
index signature
[s: string]: PropDescriptor;
namespace typemoq/Common/PropertyRetriever
module 'typemoq/Common/PropertyRetriever' {}
class PropertyRetriever
class PropertyRetriever {}
method getOwnAndPrototypeEnumerables
static getOwnAndPrototypeEnumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnAndPrototypeEnumerablesAndNonenumerables
static getOwnAndPrototypeEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnAndPrototypeNonenumerables
static getOwnAndPrototypeNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnEnumerables
static getOwnEnumerables: (obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnEnumerablesAndNonenumerables
static getOwnEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getOwnNonenumerables
static getOwnNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeEnumerables
static getPrototypeEnumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeEnumerablesAndNonenumerables
static getPrototypeEnumerablesAndNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
method getPrototypeNonenumerables
static getPrototypeNonenumerables: ( obj: any) => { name: string; desc: PropDescriptor }[];
namespace typemoq/Common/Utils
module 'typemoq/Common/Utils' {}
class Utils
class Utils {}
method argsName
static argsName: (args: IArguments) => string;
method clone
static clone: (target: Object, source: Object) => void;
method conthunktor
static conthunktor: <U>(ctor: CtorWithArgs<U>, args: any[]) => U;
method functionName
static functionName: (fun: Object) => string;
method objectName
static objectName: (obj: Object) => string;
namespace typemoq/CurrentInterceptContext
module 'typemoq/CurrentInterceptContext' {}
class CurrentInterceptContext
class CurrentInterceptContext<T> {}
property call
call: all.IProxyCall<T>;
namespace typemoq/Error/_all
module 'typemoq/Error/_all' {}
class Exception
class Exception extends Error {}
constructor
constructor(name: string, message: string);
property name
name: string;
method toString
toString: () => string;
class MockException
class MockException extends Exception {}
constructor
constructor(reason: number, ctx: any, message?: string);
property ctx
readonly ctx: any;
property message
readonly message: string;
property reason
readonly reason: number;
method toString
toString: () => string;
enum MockExceptionReason
enum MockExceptionReason { NoSetup, MoreThanOneSetup, InvalidArg, InvalidSetup, InvalidMatcher, UnknownGlobalType, CallCountVerificationFailed, CallOrderVerificationFailed, InvalidDynamicProxyRuntime,}
member CallCountVerificationFailed
CallCountVerificationFailed
member CallOrderVerificationFailed
CallOrderVerificationFailed
member InvalidArg
InvalidArg
member InvalidDynamicProxyRuntime
InvalidDynamicProxyRuntime
member InvalidMatcher
InvalidMatcher
member InvalidSetup
InvalidSetup
member MoreThanOneSetup
MoreThanOneSetup
member NoSetup
NoSetup
member UnknownGlobalType
UnknownGlobalType
namespace typemoq/Error/Exception
module 'typemoq/Error/Exception' {}
class Exception
class Exception extends Error {}
constructor
constructor(name: string, message: string);
property name
name: string;
method toString
toString: () => string;
namespace typemoq/Error/MockException
module 'typemoq/Error/MockException' {}
class MockException
class MockException extends Exception {}
constructor
constructor(reason: number, ctx: any, message?: string);
property ctx
readonly ctx: any;
property message
readonly message: string;
property reason
readonly reason: number;
method toString
toString: () => string;
enum MockExceptionReason
enum MockExceptionReason { NoSetup, MoreThanOneSetup, InvalidArg, InvalidSetup, InvalidMatcher, UnknownGlobalType, CallCountVerificationFailed, CallOrderVerificationFailed, InvalidDynamicProxyRuntime,}
member CallCountVerificationFailed
CallCountVerificationFailed
member CallOrderVerificationFailed
CallOrderVerificationFailed
member InvalidArg
InvalidArg
member InvalidDynamicProxyRuntime
InvalidDynamicProxyRuntime
member InvalidMatcher
InvalidMatcher
member InvalidSetup
InvalidSetup
member MoreThanOneSetup
MoreThanOneSetup
member NoSetup
NoSetup
member UnknownGlobalType
UnknownGlobalType
namespace typemoq/GlobalMock
module 'typemoq/GlobalMock' {}
class GlobalMock
class GlobalMock<T> implements all.IGlobalMock<T> {}
constructor
constructor( mock: all.IMock<T>, _name: string, _type: GlobalType, container: Object);
property behavior
readonly behavior: all.MockBehavior;
property callBase
callBase: boolean;
property container
container: Object;
property mock
mock: all.IMock<T>;
property name
readonly name: string;
property object
readonly object: {};
property target
readonly target: {};
property type
readonly type: GlobalType;
method reset
reset: () => void;
method setup
setup: <TResult>( expression: all.IFunc2<T, TResult>) => MethodCallReturn<T, TResult>;
method verify
verify: <TResult>(expression: all.IFunc2<T, TResult>, times: all.Times) => void;
method verifyAll
verifyAll: () => void;
enum GlobalType
enum GlobalType { Class = 0, Function = 1, Value = 2,}
namespace typemoq/InterceptorContext
module 'typemoq/InterceptorContext' {}
class InterceptorContext
class InterceptorContext<T> {}
constructor
constructor(mock: all.IMock<T>);
property behavior
readonly behavior: all.MockBehavior;
property mock
mock: all.IMock<T>;
method actualInvocations
actualInvocations: () => all.ICallContext[];
method addExpectedCall
addExpectedCall: (call: all.IProxyCall<T>) => void;
method addInvocation
addInvocation: (invocation: all.ICallContext) => void;
method expectedCalls
expectedCalls: () => all.IProxyCall<T>[];
method removeExpectedCall
removeExpectedCall: (call: all.IProxyCall<T>) => void;
method removeInvocation
removeInvocation: (invocation: all.ICallContext) => void;
method reset
reset: () => void;
interface IInterceptStrategy
interface IInterceptStrategy<T> {}
method handleIntercept
handleIntercept: ( invocation: all.ICallContext, ctx: InterceptorContext<T>, localCtx: CurrentInterceptContext<T>) => InterceptionAction;
enum InterceptionAction
enum InterceptionAction { Continue = 0, Stop = 1,}
namespace typemoq/InterceptorExecute
module 'typemoq/InterceptorExecute' {}
class InterceptorExecute
class InterceptorExecute<T> implements all.ICallInterceptor {}
constructor
constructor(mock: all.IMock<T>);
property interceptorContext
readonly interceptorContext: InterceptorContext<T>;
method addExpectedCall
addExpectedCall: (call: all.IProxyCall<T>) => void;
method intercept
intercept: (invocation: all.ICallContext) => void;
method removeInvocation
removeInvocation: (invocation: all.ICallContext) => void;
method reset
reset: () => void;
method verify
verify: () => void;
method verifyCallCount
verifyCallCount: <T>(call: all.IProxyCall<T>, times: all.Times) => void;
namespace typemoq/InterceptorSetup
module 'typemoq/InterceptorSetup' {}
class InterceptorSetup
class InterceptorSetup<T> implements all.ICallInterceptor {}
property interceptedCall
readonly interceptedCall: all.ICallContext;
method intercept
intercept: (invocation: all.ICallContext) => void;
method removeInvocation
removeInvocation: (invocation: all.ICallContext) => void;
namespace typemoq/Match/_all
module 'typemoq/Match/_all' {}
class MatchAnyNumber
class MatchAnyNumber implements IMatch {}
method toString
toString: () => string;
class MatchAnyObject
class MatchAnyObject<T> implements IMatch {}
constructor
constructor(_ctor: common.Ctor<T>);
method toString
toString: () => string;
class MatchAnyString
class MatchAnyString implements IMatch {}
method toString
toString: () => string;
class MatchObjectWith
class MatchObjectWith<T> implements IMatch {}
constructor
constructor(value: {});
method toString
toString: () => string;
class MatchPred
class MatchPred<T> implements IMatch {}
constructor
constructor(_pred: common.IFunc2<T, boolean>);
method toString
toString: () => string;
class MatchValue
class MatchValue<T> implements IMatch {}
constructor
constructor(value: {});
method toString
toString: () => string;
interface IMatch
interface IMatch {}
namespace typemoq/Match/IMatch
module 'typemoq/Match/IMatch' {}
interface IMatch
interface IMatch {}
namespace typemoq/Match/Match
module 'typemoq/Match/Match' {}
namespace typemoq/Match/MatchAny
module 'typemoq/Match/MatchAny' {}
class MatchAnyNumber
class MatchAnyNumber implements IMatch {}
method toString
toString: () => string;
class MatchAnyObject
class MatchAnyObject<T> implements IMatch {}
constructor
constructor(_ctor: common.Ctor<T>);
method toString
toString: () => string;
class MatchAnyString
class MatchAnyString implements IMatch {}
method toString
toString: () => string;
namespace typemoq/Match/MatchObjectWith
module 'typemoq/Match/MatchObjectWith' {}
class MatchObjectWith
class MatchObjectWith<T> implements IMatch {}
constructor
constructor(value: {});
method toString
toString: () => string;
namespace typemoq/Match/MatchPred
module 'typemoq/Match/MatchPred' {}
class MatchPred
class MatchPred<T> implements IMatch {}
constructor
constructor(_pred: common.IFunc2<T, boolean>);
method toString
toString: () => string;
namespace typemoq/Match/MatchValue
module 'typemoq/Match/MatchValue' {}
class MatchValue
class MatchValue<T> implements IMatch {}
constructor
constructor(value: {});
method toString
toString: () => string;
namespace typemoq/MethodCall
module 'typemoq/MethodCall' {}
class MethodCall
class MethodCall<T, TResult> implements all.IProxyCall<T>, all.IVerifies {}
constructor
protected constructor( mock: MockBase<T>, _setupExpression: all.IFunc2<T, TResult>, interceptor: InterceptorSetup<T>, proxy: {});
property callCount
readonly callCount: number;
property expectedCallCount
readonly expectedCallCount: all.Times;
property id
readonly id: string;
property isInSequence
readonly isInSequence: boolean;
property isInvoked
readonly isInvoked: boolean;
property isVerifiable
readonly isVerifiable: boolean;
property mock
mock: MockBase<T>;
property setupCall
readonly setupCall: all.ICallContext;
property setupExpression
readonly setupExpression: all.IAction1<T>;