Fixing type problems
This commit is contained in:
parent
1ec4166854
commit
50b8ff7b34
1
lib/request.d.ts
vendored
1
lib/request.d.ts
vendored
@ -1,4 +1,5 @@
|
|||||||
/// <reference types="node" />
|
/// <reference types="node" />
|
||||||
|
import { Message, MessageHeader, MessageQuestion, MessageRecourceRecord } from "./types";
|
||||||
export declare enum queryTypes {
|
export declare enum queryTypes {
|
||||||
/**
|
/**
|
||||||
* IPv4 address
|
* IPv4 address
|
||||||
|
File diff suppressed because one or more lines are too long
8
lib/types.d.ts
vendored
8
lib/types.d.ts
vendored
@ -1,5 +1,5 @@
|
|||||||
/// <reference types="node" />
|
/// <reference types="node" />
|
||||||
interface MessageHeader {
|
export interface MessageHeader {
|
||||||
/**
|
/**
|
||||||
* A 16 bit identifier assigned by the program that
|
* A 16 bit identifier assigned by the program that
|
||||||
* generates any kind of query. This identifier is copied
|
* generates any kind of query. This identifier is copied
|
||||||
@ -83,7 +83,7 @@ interface MessageHeader {
|
|||||||
*/
|
*/
|
||||||
ARCOUNT: number;
|
ARCOUNT: number;
|
||||||
}
|
}
|
||||||
interface MessageQuestion {
|
export interface MessageQuestion {
|
||||||
/**
|
/**
|
||||||
* Domain name represented as sequence of labels
|
* Domain name represented as sequence of labels
|
||||||
* Each label consists of a length octed followed
|
* Each label consists of a length octed followed
|
||||||
@ -101,7 +101,7 @@ interface MessageQuestion {
|
|||||||
*/
|
*/
|
||||||
QCLASS: number;
|
QCLASS: number;
|
||||||
}
|
}
|
||||||
interface MessageRecourceRecord {
|
export interface MessageRecourceRecord {
|
||||||
/**
|
/**
|
||||||
* Domain name to wich resource record pertains
|
* Domain name to wich resource record pertains
|
||||||
*/
|
*/
|
||||||
@ -143,7 +143,7 @@ interface MessageRecourceRecord {
|
|||||||
*/
|
*/
|
||||||
RDATA: Buffer;
|
RDATA: Buffer;
|
||||||
}
|
}
|
||||||
interface Message {
|
export interface Message {
|
||||||
header: MessageHeader;
|
header: MessageHeader;
|
||||||
questions: MessageQuestion[];
|
questions: MessageQuestion[];
|
||||||
answers: MessageRecourceRecord[];
|
answers: MessageRecourceRecord[];
|
||||||
|
@ -1 +1,3 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
//# sourceMappingURL=types.js.map
|
//# sourceMappingURL=types.js.map
|
@ -1,4 +1,5 @@
|
|||||||
import { Parser } from "binary-parser"
|
import { Parser } from "binary-parser"
|
||||||
|
import { Message, MessageHeader, MessageQuestion, MessageRecourceRecord } from "./types"
|
||||||
|
|
||||||
const MAX_LABEL_SIZE = 63;
|
const MAX_LABEL_SIZE = 63;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
interface MessageHeader {
|
export interface MessageHeader {
|
||||||
/**
|
/**
|
||||||
* A 16 bit identifier assigned by the program that
|
* A 16 bit identifier assigned by the program that
|
||||||
* generates any kind of query. This identifier is copied
|
* generates any kind of query. This identifier is copied
|
||||||
@ -95,7 +95,7 @@ interface MessageHeader {
|
|||||||
*/
|
*/
|
||||||
ARCOUNT: number;
|
ARCOUNT: number;
|
||||||
}
|
}
|
||||||
interface MessageQuestion {
|
export interface MessageQuestion {
|
||||||
/**
|
/**
|
||||||
* Domain name represented as sequence of labels
|
* Domain name represented as sequence of labels
|
||||||
* Each label consists of a length octed followed
|
* Each label consists of a length octed followed
|
||||||
@ -115,7 +115,7 @@ interface MessageQuestion {
|
|||||||
*/
|
*/
|
||||||
QCLASS: number;
|
QCLASS: number;
|
||||||
}
|
}
|
||||||
interface MessageRecourceRecord {
|
export interface MessageRecourceRecord {
|
||||||
/**
|
/**
|
||||||
* Domain name to wich resource record pertains
|
* Domain name to wich resource record pertains
|
||||||
*/
|
*/
|
||||||
@ -162,7 +162,7 @@ interface MessageRecourceRecord {
|
|||||||
*/
|
*/
|
||||||
RDATA: Buffer;
|
RDATA: Buffer;
|
||||||
}
|
}
|
||||||
interface Message {
|
export interface Message {
|
||||||
header: MessageHeader;
|
header: MessageHeader;
|
||||||
questions: MessageQuestion[];
|
questions: MessageQuestion[];
|
||||||
answers: MessageRecourceRecord[];
|
answers: MessageRecourceRecord[];
|
||||||
|
Loading…
Reference in New Issue
Block a user