adding jsdoc to ErrorCodes

This commit is contained in:
Fabian Stamm 2018-05-13 22:05:12 +02:00
parent 68f44878d3
commit 8c66f9a41b
5 changed files with 61 additions and 2 deletions

18
lib/types.d.ts vendored
View File

@ -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 {

View File

@ -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

View File

@ -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"}

View File

@ -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>",

View File

@ -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
}