Adding private flag to private properties
This commit is contained in:
parent
8d3b541d3d
commit
666ad69c3c
5
lib/request.d.ts
vendored
5
lib/request.d.ts
vendored
@ -93,14 +93,13 @@ export declare enum QueryTypes {
|
|||||||
export declare function SerializeName(name: string): Buffer;
|
export declare function SerializeName(name: string): Buffer;
|
||||||
export declare class Request implements Message {
|
export declare class Request implements Message {
|
||||||
private sendCallback;
|
private sendCallback;
|
||||||
_header: MessageHeader;
|
private _header;
|
||||||
readonly header: MessageHeader;
|
readonly header: MessageHeader;
|
||||||
_questions: MessageQuestion[];
|
private _questions;
|
||||||
readonly questions: MessageQuestion[];
|
readonly questions: MessageQuestion[];
|
||||||
answers: RecourceRecord[];
|
answers: RecourceRecord[];
|
||||||
authorities: RecourceRecord[];
|
authorities: RecourceRecord[];
|
||||||
additionals: RecourceRecord[];
|
additionals: RecourceRecord[];
|
||||||
_packet: Buffer;
|
|
||||||
constructor(packet: Buffer, sendCallback: (packet: Buffer) => any);
|
constructor(packet: Buffer, sendCallback: (packet: Buffer) => any);
|
||||||
error(error: ErrorCodes): void;
|
error(error: ErrorCodes): void;
|
||||||
noRecursion(): void;
|
noRecursion(): void;
|
||||||
|
@ -168,7 +168,6 @@ class Request {
|
|||||||
this.answers = [];
|
this.answers = [];
|
||||||
this.authorities = [];
|
this.authorities = [];
|
||||||
this.additionals = [];
|
this.additionals = [];
|
||||||
this._packet = packet;
|
|
||||||
let headerData = Buffer.alloc(12);
|
let headerData = Buffer.alloc(12);
|
||||||
packet.copy(headerData, 0, 0, 12);
|
packet.copy(headerData, 0, 0, 12);
|
||||||
let bodyData = Buffer.alloc(packet.length - 12);
|
let bodyData = Buffer.alloc(packet.length - 12);
|
||||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nodename-core",
|
"name": "nodename-core",
|
||||||
"version": "0.1.8",
|
"version": "0.1.9",
|
||||||
"main": "lib/listener.js",
|
"main": "lib/listener.js",
|
||||||
"types": "lib/listener.d.ts",
|
"types": "lib/listener.d.ts",
|
||||||
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
"author": "Fabian Stamm <dev@fabianstamm.de>",
|
||||||
|
@ -188,12 +188,12 @@ export function SerializeName(name: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class Request implements Message {
|
export class Request implements Message {
|
||||||
_header: MessageHeader;
|
private _header: MessageHeader;
|
||||||
get header() {
|
get header() {
|
||||||
return Object.assign({}, this._header);
|
return Object.assign({}, this._header);
|
||||||
}
|
}
|
||||||
|
|
||||||
_questions: MessageQuestion[];
|
private _questions: MessageQuestion[];
|
||||||
get questions() {
|
get questions() {
|
||||||
return this._questions.map(e => e);
|
return this._questions.map(e => e);
|
||||||
}
|
}
|
||||||
@ -202,9 +202,7 @@ export class Request implements Message {
|
|||||||
authorities: RecourceRecord[] = [];
|
authorities: RecourceRecord[] = [];
|
||||||
additionals: RecourceRecord[] = [];
|
additionals: RecourceRecord[] = [];
|
||||||
|
|
||||||
_packet: Buffer;
|
|
||||||
constructor(packet: Buffer, private sendCallback: (packet: Buffer) => any) {
|
constructor(packet: Buffer, private sendCallback: (packet: Buffer) => any) {
|
||||||
this._packet = packet;
|
|
||||||
let headerData = Buffer.alloc(12);
|
let headerData = Buffer.alloc(12);
|
||||||
packet.copy(headerData, 0, 0, 12);
|
packet.copy(headerData, 0, 0, 12);
|
||||||
let bodyData = Buffer.alloc(packet.length - 12);
|
let bodyData = Buffer.alloc(packet.length - 12);
|
||||||
|
Loading…
Reference in New Issue
Block a user