Fixing type problems

This commit is contained in:
Fabian Stamm 2018-05-13 13:10:04 +02:00
parent 1ec4166854
commit 50b8ff7b34
6 changed files with 13 additions and 9 deletions

1
lib/request.d.ts vendored
View File

@ -1,4 +1,5 @@
/// <reference types="node" />
import { Message, MessageHeader, MessageQuestion, MessageRecourceRecord } from "./types";
export declare enum queryTypes {
/**
* IPv4 address

File diff suppressed because one or more lines are too long

8
lib/types.d.ts vendored
View File

@ -1,5 +1,5 @@
/// <reference types="node" />
interface MessageHeader {
export interface MessageHeader {
/**
* A 16 bit identifier assigned by the program that
* generates any kind of query. This identifier is copied
@ -83,7 +83,7 @@ interface MessageHeader {
*/
ARCOUNT: number;
}
interface MessageQuestion {
export interface MessageQuestion {
/**
* Domain name represented as sequence of labels
* Each label consists of a length octed followed
@ -101,7 +101,7 @@ interface MessageQuestion {
*/
QCLASS: number;
}
interface MessageRecourceRecord {
export interface MessageRecourceRecord {
/**
* Domain name to wich resource record pertains
*/
@ -143,7 +143,7 @@ interface MessageRecourceRecord {
*/
RDATA: Buffer;
}
interface Message {
export interface Message {
header: MessageHeader;
questions: MessageQuestion[];
answers: MessageRecourceRecord[];

View File

@ -1 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map

View File

@ -1,4 +1,5 @@
import { Parser } from "binary-parser"
import { Message, MessageHeader, MessageQuestion, MessageRecourceRecord } from "./types"
const MAX_LABEL_SIZE = 63;

View File

@ -1,4 +1,4 @@
interface MessageHeader {
export interface MessageHeader {
/**
* A 16 bit identifier assigned by the program that
* generates any kind of query. This identifier is copied
@ -95,7 +95,7 @@ interface MessageHeader {
*/
ARCOUNT: number;
}
interface MessageQuestion {
export interface MessageQuestion {
/**
* Domain name represented as sequence of labels
* Each label consists of a length octed followed
@ -115,7 +115,7 @@ interface MessageQuestion {
*/
QCLASS: number;
}
interface MessageRecourceRecord {
export interface MessageRecourceRecord {
/**
* Domain name to wich resource record pertains
*/
@ -162,7 +162,7 @@ interface MessageRecourceRecord {
*/
RDATA: Buffer;
}
interface Message {
export interface Message {
header: MessageHeader;
questions: MessageQuestion[];
answers: MessageRecourceRecord[];