adding jsdoc to ErrorCodes
This commit is contained in:
parent
68f44878d3
commit
8c66f9a41b
18
lib/types.d.ts
vendored
18
lib/types.d.ts
vendored
@ -1,10 +1,28 @@
|
||||
/// <reference types="node" />
|
||||
export declare enum ErrorCodes {
|
||||
/**
|
||||
* No error
|
||||
*/
|
||||
NoError = 0,
|
||||
/**
|
||||
* Format error - unable to interpret query
|
||||
*/
|
||||
FormatError = 1,
|
||||
/**
|
||||
* Server failure - internal problem
|
||||
*/
|
||||
ServerFailure = 2,
|
||||
/**
|
||||
* Name error - Only for authorative name server, domain name of query does not exist
|
||||
*/
|
||||
NameError = 3,
|
||||
/**
|
||||
* Not implemented - Request not supported
|
||||
*/
|
||||
NotImplemented = 4,
|
||||
/**
|
||||
* Refused - Nameserver refuses request
|
||||
*/
|
||||
Refused = 5,
|
||||
}
|
||||
export interface MessageHeader {
|
||||
|
18
lib/types.js
18
lib/types.js
@ -10,11 +10,29 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// *
|
||||
var ErrorCodes;
|
||||
(function (ErrorCodes) {
|
||||
/**
|
||||
* No error
|
||||
*/
|
||||
ErrorCodes[ErrorCodes["NoError"] = 0] = "NoError";
|
||||
/**
|
||||
* Format error - unable to interpret query
|
||||
*/
|
||||
ErrorCodes[ErrorCodes["FormatError"] = 1] = "FormatError";
|
||||
/**
|
||||
* Server failure - internal problem
|
||||
*/
|
||||
ErrorCodes[ErrorCodes["ServerFailure"] = 2] = "ServerFailure";
|
||||
/**
|
||||
* Name error - Only for authorative name server, domain name of query does not exist
|
||||
*/
|
||||
ErrorCodes[ErrorCodes["NameError"] = 3] = "NameError";
|
||||
/**
|
||||
* Not implemented - Request not supported
|
||||
*/
|
||||
ErrorCodes[ErrorCodes["NotImplemented"] = 4] = "NotImplemented";
|
||||
/**
|
||||
* Refused - Nameserver refuses request
|
||||
*/
|
||||
ErrorCodes[ErrorCodes["Refused"] = 5] = "Refused";
|
||||
})(ErrorCodes = exports.ErrorCodes || (exports.ErrorCodes = {}));
|
||||
//# sourceMappingURL=types.js.map
|
@ -1 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AACA,uBAAuB;AACvB,kDAAkD;AAClD,8CAA8C;AAC9C,kGAAkG;AAClG,0DAA0D;AAC1D,0DAA0D;AAC1D,wCAAwC;AACxC,WAAW;AACX,IAAY,UAOX;AAPD,WAAY,UAAU;IACnB,iDAAW,CAAA;IACX,yDAAW,CAAA;IACX,6DAAa,CAAA;IACb,qDAAS,CAAA;IACT,+DAAc,CAAA;IACd,iDAAO,CAAA;AACV,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB"}
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;AACA,uBAAuB;AACvB,kDAAkD;AAClD,8CAA8C;AAC9C,kGAAkG;AAClG,0DAA0D;AAC1D,0DAA0D;AAC1D,wCAAwC;AACxC,WAAW;AACX,IAAY,UA8BX;AA9BD,WAAY,UAAU;IACnB;;OAEG;IACH,iDAAW,CAAA;IAEX;;OAEG;IACH,yDAAW,CAAA;IAEX;;OAEG;IACH,6DAAa,CAAA;IAEb;;OAEG;IACH,qDAAS,CAAA;IAET;;OAEG;IACH,+DAAc,CAAA;IAEd;;OAEG;IACH,iDAAO,CAAA;AACV,CAAC,EA9BW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QA8BrB"}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nodename-core",
|
||||
"version": "0.1.5",
|
||||
"version": "0.1.6",
|
||||
"main": "lib/listener.js",
|
||||
"types": "lib/listener.d.ts",
|
||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||
|
23
src/types.ts
23
src/types.ts
@ -8,11 +8,34 @@
|
||||
// * 6 - 15 Reserved for future usage
|
||||
// *
|
||||
export enum ErrorCodes {
|
||||
/**
|
||||
* No error
|
||||
*/
|
||||
NoError = 0,
|
||||
|
||||
/**
|
||||
* Format error - unable to interpret query
|
||||
*/
|
||||
FormatError,
|
||||
|
||||
/**
|
||||
* Server failure - internal problem
|
||||
*/
|
||||
ServerFailure,
|
||||
|
||||
/**
|
||||
* Name error - Only for authorative name server, domain name of query does not exist
|
||||
*/
|
||||
NameError,
|
||||
|
||||
/**
|
||||
* Not implemented - Request not supported
|
||||
*/
|
||||
NotImplemented,
|
||||
|
||||
/**
|
||||
* Refused - Nameserver refuses request
|
||||
*/
|
||||
Refused
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user