File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,10 @@ export const ErrorResponseTypes = Enum(
59
59
) ;
60
60
61
61
export class APIErrorResponseErrorResponse {
62
- readonly type = ErrorResponseTypes . APIErrorResponse ;
62
+ // Literal type annotation required due to bug whereby literal types are
63
+ // lost in declarations.
64
+ // https://github.com/Microsoft/TypeScript/issues/15881
65
+ readonly type : typeof ErrorResponseTypes . APIErrorResponse = ErrorResponseTypes . APIErrorResponse ;
63
66
64
67
constructor (
65
68
public statusCode : number ,
@@ -68,7 +71,11 @@ export class APIErrorResponseErrorResponse {
68
71
}
69
72
70
73
export class ValidationErrorsErrorResponse {
71
- readonly type = ErrorResponseTypes . ValidationErrorsError ;
74
+ // Literal type annotation required due to bug whereby literal types are
75
+ // lost in declarations.
76
+ // https://github.com/Microsoft/TypeScript/issues/15881
77
+ // tslint:disable-next-line max-line-length
78
+ readonly type : typeof ErrorResponseTypes . ValidationErrorsError = ErrorResponseTypes . ValidationErrorsError ;
72
79
73
80
constructor (
74
81
public statusCode : number ,
You can’t perform that action at this time.
0 commit comments