fix: corrected JSDoc comments
This commit is contained in:
@@ -110,6 +110,10 @@ export class ApiResponse<T> {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @method AsFieldType - Converts the ApiResponse to an ApiResponse<Field>.
|
||||
* @returns {ApiResponse<Field>} - An ApiResponse<Field>.
|
||||
*/
|
||||
public AsFieldType(): ApiResponse<Field> {
|
||||
const apiResponse = this as ApiResponse<any>;
|
||||
|
||||
|
||||
@@ -111,8 +111,7 @@ export class OnspringClient {
|
||||
}
|
||||
|
||||
/**
|
||||
* @method getFields - Gets a paged list of fields.
|
||||
* @param {PagingRequest} pagingRequest - The paging request that will be used to get the fields.
|
||||
* @method getFieldById - Gets a field by its id.
|
||||
* @returns {Promise<ApiResponse<Field>>} - A promise that resolves to an ApiResponse of type Field.
|
||||
*/
|
||||
public async getFieldById(fieldId: number): Promise<ApiResponse<Field>> {
|
||||
|
||||
+12
-12
@@ -20,6 +20,18 @@ describe('Field', function () {
|
||||
).to.not.throw();
|
||||
});
|
||||
|
||||
it('should throw an error when the type parameter is not a valid value', function () {
|
||||
expect(
|
||||
() => new Field(1, 1, 'Text Field', 'Invalid', 'Enabled', true, false)
|
||||
).to.throw();
|
||||
});
|
||||
|
||||
it('should throw an error when the status parameter is not a valid value', function () {
|
||||
expect(
|
||||
() => new Field(1, 1, 'Text Field', 'Text', 'Unabled', true, false)
|
||||
).to.throw();
|
||||
});
|
||||
|
||||
it('should create a new instance of the Field class with the correct properties and values', function () {
|
||||
const field = new Field(1, 1, 'Text Field', 'Text', 'Enabled', true, false);
|
||||
|
||||
@@ -38,16 +50,4 @@ describe('Field', function () {
|
||||
expect(field.isRequired).to.equal(true);
|
||||
expect(field.isUnique).to.equal(false);
|
||||
});
|
||||
|
||||
it('should throw an error when the type parameter is not a valid value', function () {
|
||||
expect(
|
||||
() => new Field(1, 1, 'Text Field', 'Invalid', 'Enabled', true, false)
|
||||
).to.throw();
|
||||
});
|
||||
|
||||
it('should throw an error when the status parameter is not a valid value', function () {
|
||||
expect(
|
||||
() => new Field(1, 1, 'Text Field', 'Text', 'Unabled', true, false)
|
||||
).to.throw();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user