@decentm/concourse-ts-resource-mock
v0.2.1
Published
`npm i --save-dev @decentm/concourse-ts @decentm/concourse-ts-resource-mock`
Downloads
5
Readme
Typed Mock resource for concourse-ts
Installation
npm i --save-dev @decentm/concourse-ts @decentm/concourse-ts-resource-mock
yarn add -D @decentm/concourse-ts @decentm/concourse-ts-resource-mock
Usage
The Mock resource is a typed class that extends the base Resource class. Therefore, it has the same properties. See the Resource documentation for details.
import {Type} from '@decentm/concourse-ts'
import {MockResource, MockResourceType} from '@decentm/concourse-ts-resource-mock'
export class CorpityCorpMock extends MockResource {
constructor(name: string, init?: Type.Initer<CorpityCorpMock>) {
super(name, new MockResourceType(/*...*/))
// Set defaults here
if (init) {
init(this)
}
}
}