I was looked around , and this question looks like a repeating thing . However, none of the solutions I found seem to work for me.
Using the following:
{
"typescript": "2.3.2",
"jasmine-core": "2.6.1",
"@types/jasmine": "2.5.47"
}
I cannot get Typescript to merge the namespace declaration containing my custom mate definition.
Adding this:
declare namespace jasmine {
interface Matchers<T> {
toBeAnyOf(expected: jasmine.Expected<T>, expectationFailOutput?: any): boolean;
}
}
Hides all other types previously declared on jasmine
. The compiler displays errors such as:
[ts] Namespace 'jasmine' has no exported member 'CustomMatcherFactories'
[ts] Namespace 'jasmine' has no exported member 'CustomMatcher'.
Is there any suitable way to add custom matches and make it beautiful with Typescript?
tslint:recommended
, tslint
. namespace
module
, linter ( "no-namespace"
), . , , " ".