Skip to content

Repository files navigation

@externs/nodejs

npm version

@externs/nodejs is The Google Closure Compiler Externs For Node.JS.

yarn add -E @externs/nodejs

Table Of Contents

Method

The method is to use tsickle on the types definition file for Node.JS (@types/node/index.d.ts). However, there are a few steps that were taken to prepare the externs:

  1. The definitions are split into individual files, making it easier to track warnings and maintain the manual changes that have to be made for each extern.

  2. When trying to generate from the single file, there's a conflict between declare var Buffer and interface Buffer, which TypeScript is fine with, but tsickle fails to process properly. To overcome this, the NodeBuffer interface is just moved into a separate file, the externs for it are generated, and then manually updated to include static methods from var Buffer. This can also be done by declaring Buffer as a class with static methods, but we did it manually.

    // original node.d.ts// Declaring both var and interface DOES NOT WORK WITH TSICKLEinterfaceBufferextendsNodeBuffer{}declarevarBuffer: {}// later on ...interfaceNodeBufferextendsUint8Array{}
  3. There have been tests added to the Buffer interface to make sure there are no warnings when working with Buffer API. These tests is just an illustration of how externs can be tested, i.e., to make sure the GCC does not produce any warnings.

    Show Buffer tests (depack test/spec/buffer.js -a --checks_only --externs v8/global/buffer.js --externs v8/global.js shows no warnings).
    constab=newArrayBuffer(16)constdata=['hello','world']conststring='hello world'/** @type {!Buffer} */varbb=newBuffer(string)b=newBuffer(string,'utf8')b=newBuffer(100)b=newBuffer(newUint8Array(100))b=newBuffer(ab)b=newBuffer(data)b=newBuffer(b)b=Buffer.from(ab)b=Buffer.from(ab,10)b=Buffer.from(ab,10,20)b=Buffer.from(data)b=Buffer.from(string)b=Buffer.from(b)b=Buffer.from(ab)b=Buffer.from(string,'utf8')/** @type {boolean} */varib=Buffer.isBuffer(string)ib=Buffer.isBuffer(b)/** @type {boolean} */varie=Buffer.isEncoding('utf8')ie=Buffer.isEncoding('sirocco5')/** @type {number} */varbl=Buffer.byteLength(string)bl=Buffer.byteLength(b)bl=Buffer.byteLength(newDataView(ab))bl=Buffer.byteLength(ab)bl=Buffer.byteLength(string,'utf8')b=Buffer.concat([b,b])b=Buffer.concat([b,b],10)/** @type {number} */varn=Buffer.compare(b,b)b=Buffer.alloc(10)b=Buffer.alloc(10,string)b=Buffer.alloc(10,b)b=Buffer.alloc(10,10)b=Buffer.alloc(10,string,'utf8')b=Buffer.allocUnsafe(10)b=Buffer.allocUnsafeSlow(10)/** @type {number} */varps=Buffer.poolSize
  4. Because of warnings and cases that tsickle can't handle, some externs need manual update by looking at the error messages and also manual inspection of generated code.

  5. The globals are only defined as the global object in global.d.ts: declare var global: NodeJS.Global;. These do not get propagated to the global scope. For now, we're not sure whether properties of the NodeJS.Global other than Buffer should be expanded into the global context, because Closure will probably handle them already since they're generic JS.

    Show globals
    exportinterfaceGlobal{Array: typeofArray;ArrayBuffer: typeofArrayBuffer;Boolean: typeofBoolean;Buffer: typeofBuffer;DataView: typeofDataView;Date: typeofDate;Error: typeofError;EvalError: typeofEvalError;Float32Array: typeofFloat32Array;Float64Array: typeofFloat64Array;Function: typeofFunction;GLOBAL: Global;Infinity: typeofInfinity;Int16Array: typeofInt16Array;Int32Array: typeofInt32Array;Int8Array: typeofInt8Array;Intl: typeofIntl;JSON: typeofJSON;Map: MapConstructor;Math: typeofMath;NaN: typeofNaN;Number: typeofNumber;Object: typeofObject;Promise: Function;RangeError: typeofRangeError;ReferenceError: typeofReferenceError;RegExp: typeofRegExp;Set: SetConstructor;String: typeofString;Symbol: Function;SyntaxError: typeofSyntaxError;TypeError: typeofTypeError;URIError: typeofURIError;Uint16Array: typeofUint16Array;Uint32Array: typeofUint32Array;Uint8Array: typeofUint8Array;Uint8ClampedArray: Function;WeakMap: WeakMapConstructor;WeakSet: WeakSetConstructor;// clearImmediate is part of global externclearImmediate: (immediateId: any)=>void;// clearInterval is skipped by tsickleclearInterval: (intervalId: NodeJS.Timer)=>void;// clearTimeout is skipped by tsickleclearTimeout: (timeoutId: NodeJS.Timer)=>void;// console is part of global externconsole: typeofconsole;decodeURI: typeofdecodeURI;decodeURIComponent: typeofdecodeURIComponent;encodeURI: typeofencodeURI;encodeURIComponent: typeofencodeURIComponent;escape: (str: string)=>string;eval: typeofeval;// global is part of global externglobal: Global;isFinite: typeofisFinite;isNaN: typeofisNaN;parseFloat: typeofparseFloat;parseInt: typeofparseInt;// process is part of global externprocess: Process;// root is NOT part of global extern: SHOULD IT BE?root: Global;// setImmediate is part of global externsetImmediate: (callback: (...args: any[])=>void, ...args: any[])=>any;// setInterval is skipped by tsicklesetInterval: (callback: (...args: any[])=>void,ms: number, ...args: any[])=>NodeJS.Timer;// setTimeout is skipped by tsicklesetTimeout: (callback: (...args: any[])=>void,ms: number, ...args: any[])=>NodeJS.Timer;undefined: typeofundefined;unescape: (str: string)=>string;gc: ()=>void;v8debug?: any;}

The issue with splitting the declarations into separate files is that it is harder to merge upstream updates into it, and a lot of manual work has to be done. Therefore, ideally there would have to be patch scripts that would allow to update generated types, however at the moment externs are updated by hand when there are warnings.

API

importgetExternsDir,{dependencies}from'@externs/nodejs'

The externs for each of the modules are found in the published v8 directory. The global and nodejs externs always need to be present when compiling a Node.JS program (unless its in pure JS). Externs might depend on other externs, and the dependency tree is exported by this package:

/* alanode example/ */importgetExternsDir,{dependencies}from'../src'console.log('Externs dir: %s',getExternsDir())console.log('Dependencies:')console.log(dependencies)
Externs dir: v8
Dependencies:
{url: ['querystring'],stream: ['events'],net: ['stream','events','dns'],fs: ['stream','events','url'],tls: ['crypto','dns','net','stream'],http: ['events','net','stream','url'],https: ['tls','events','http','url'],http2: ['events','fs','net','stream','tls','http','url'],zlib: ['stream'],child_process: ['events','stream','net'],cluster: ['child_process','events','net'],readline: ['events','stream'],repl: ['stream','readline'],dgram: ['events','dns'],string_decoder: ['buffer'],domain: ['events'],tty: ['net']}

getExternsDir(): string

Runs require.resolve('@externs/nodejs/package.json') to find the location of this package, and adds the v8 at the end to point to the externs version 8 (currently only Node 8 is supported).

How To Use

These externs were generated for the use by Depack: the dependency bundler for the web and back-end Node.JS. Depack will perform regex-based static analysis on modules, and when they import an internal module (e.g., path), it will mark an extern as needed to be added. It will then add the require call to the output wrapper:

import{join}from'path'// will produce the wrapperconstpath=require('path')

The important thing about how compiling Node.JS packages works in Depack, is the strategy when a pseudo built-in module is placed in node_modules. For example, for the path internal, the following code will be produced in node_modules/path/index.js:

exportdefaultpathexportconst{
basename,
delimiter,
dirname,
extname,
format,
isAbsolute,
join,
normalize,
parse,
posix,
relative,
resolve,
sep,
win32,}=path

Because path was previously defined in the output wrapper and an extern was added, all its properties will be destructured and exported correctly.

Clashes

This might need some rethinking...

There are 3 modules that have the same name as some global variable: module and console and buffer. The crypto extern already exists in the GCC. Therefore, Depack will require them using an underscore:

// module !== require('module') so this is goodconst_module=require('module')// console === require('console') so we might change that laterconst_console=require('console')// buffer === require('buffer') so we might change that laterconst_buffer=require('buffer')const_crypto=require('crypto')

Warnings And Todos

There were warnings that were emitted during the generation of each extern. Those warnings needed to be fixed manually. There are also TODO statements generated by tsickle that could not perform some analysis. They also needed (and still need) to be fixed manually.

tsickle is not able to handle:

  • PropertySignature:
    exportinterfaceIncomingHttpHeaders{'accept'?: string;}
  • IncludesNonWideningType:
    exporttypeServerOptions=tls.SecureContextOptions&tls.TlsOptions;
  • omitting interface deriving from class (not always):
    exportinterfaceReadableStreamextendsEventEmitter{}
  • omitting heritage reference to a type/value (not sure wat):
    exportinterfaceErrnoExceptionextendsError{}

omitting interface deriving from class For some reason, the class will not always be able to extend another class. E.g., the @extends {event.EventEmitter} has to be added manually in many files that rely on it.

Export = internal

Events and Stream have a typed structure that exports an internal property:

declare module "events"{classinternalextendsNodeJS.EventEmitter{}namespaceinternal{exportclassEventEmitterextendsinternal{staticlistenerCount(emitter: EventEmitter,event: string|symbol): number;
...
}}export=internal;}

This will result in externs having the internal property:

/** * @param {(string|symbol)} type * @return {number} */events.internal.EventEmitter.prototype.listenerCount=function(type){};

This is obviously incorrect, so that .internal needs to be removed manually.

Global

// interface NodeBuffer extends Uint8Array {types-v8/global.d.ts(188,1): warningTS0: omittingheritagereferencetoatype/value conflict: Uint8Array
  • Add@ extends {Uint8Array} to Buffer.

  • Update NodeRequire to be callable, add tests:

    BeforeAfter
    /*** @record* @struct*/functionNodeRequireFunction(){}/* TODO: CallSignature: *//*** @extends {NodeRequireFunction}* @record* @struct*/functionNodeRequire(){}/** @type {!RequireResolve} */NodeRequire.prototype.resolve;/*** @record* @struct*/functionRequireResolve(){}
    /** * @param {string} id * @returns {?} */functionNodeRequireFunction(id){}/* TODO: CallSignature: *//*** @param {string} id* @returns {*}*/functionNodeRequire(id){}/** @type {!RequireResolve} */NodeRequire.prototype.resolve;/*** @param {string} request* @param {{paths:!Array<string>}} options* @return {string}*/functionRequireResolve(request,options){}
  • The NodeModule.prototype.require should not reference NodeRequire instead of NodeRequireFunction because NodeRequire is just a function without additional properties such as .cacheetc. However, NodeRequireFunction still needs to be changed to a function from @struct.

Node.JS

Node.JS is an interface that contains API referenced in other classes. Although there's no such thing as NodeJS extern, its properties are referenced in other externs. Because it is also referenced in the global.d.ts, it will always be added by Depack when compiling a Node.JS program.

types-v8/nodejs.d.ts(98,3): warningTS0: omittingheritagereferencetoatype/value conflict: Errortypes-v8/nodejs.d.ts(123,3): warningTS0: omittinginterfacederivingfromclass: EventEmittertypes-v8/nodejs.d.ts(137,3): warningTS0: omittinginterfacederivingfromclass: EventEmittertypes-v8/nodejs.d.ts(149,3): warningTS0: omittinginterfacederivingfromclass: EventEmittertypes-v8/nodejs.d.ts(255,3): warningTS0: omittinginterfacederivingfromclass: EventEmittertypes-v8/nodejs.d.ts(270,7): warningTS0: shouldnotemita'never'typetypes-v8/nodejs.d.ts(446,7): warningTS0: anonymoustypehasnosymbol
  • Add@extends {Error} to ErrnoException
  • Add@extends {NodeJS.EventEmitter} to ReadableStream
  • Add@extends {NodeJS.EventEmitter} to WritableStream
  • Add@extends {NodeJS.EventEmitter} to Events
  • Add@extends {NodeJS.EventEmitter} to Process
  • AddIntl type to NodeJS.Global.prototype.Intl;
  • Remove@struct from ProcessEnv to prevent warning
    test/code.js:7: WARNING-Cannotdo'[]'accessonastructconstoutput=process.env['OUTPUT']
  • AddError.prepareStackTrace to the Closure's Error extern.

Events

  • Remove .internal.

Because events is both a namespace, and a function, it is exported in the following way:

/** @const */varevents={};/** * @extends {NodeJS.EventEmitter} * @constructor * @struct */events=function(){};

This will lead to the compiler warning:

v8/events.js:15: WARNING-accessingnameeventsinexternshasnoeffect.Perhapsyouforgottoaddavarkeyword?
events=function(){};^^^^^^v8/events.js:15: WARNING-constanteventsassignedavaluemorethanonce.Originaldefinitionatv8/events.js:9events=function(){};^^^^^^^^^^^^^^^^^^^^^^

Therefore, we collapse the 2 declarations together into

/** * @extends {NodeJS.EventEmitter} * @constructor * @struct */varevents=function(){};

Stream

// export class Duplex extends Readable implements Writable {types-v8/stream.d.ts(200,7): warningTS0: omitting @implementsofaclass: Writable
  • Remove .internal.
  • Because @constructor cannot inherit more than one class, the @extends {Writable} is not added, however because the methods have been defined in types as implementations of the Writable interfaces, they are added to the Duplex prototype itself.

Same as for events (see above), collapse the declaration into a single var definition.

/** * @extends {events.EventEmitter} * @constructor * @struct */varstream=function(){};

Assert

// export function fail(message?: string): never;types-v8/assert.d.ts(19,7): warningTS0: shouldnotemita'never'type// export function fail(actual: any, expected: any, message?: string, operator?: string, stackStartFn?: Function): never;types-v8/assert.d.ts(20,7): warningTS0: shouldnotemita'never'type
  • Remove .internal and {} namespace declaration (see Events for description).
  • Despite the warning, the AssertionErrordoes extendError.
    // export class AssertionError implements Error {types-v8/assert.d.ts(4,7): warningTS0: omittingheritagereferencetoatype/value conflict: Error

Missing Methods In Types

  • doesNotReject added in V8.13.0
  • rejects added in V8.13.0
  • strict added in V8.13.0

v8

There are some missing APIs that appeared in Node 8 that are not present in types.

Missing Methods In Types

  • serialize
  • deserialize
  • cachedDataVersionTag
  • Serializer
  • Deserializer
  • DefaultSerializer
  • DefaultDeserializer

Cluster

  • Already present@ extends {events.EventEmitter} to Cluster.
    // export interface Cluster extends events.EventEmitter {types-v8/cluster.d.ts(98,3): warningTS0: omittinginterfacederivingfromclass: events.EventEmitter

Missing Methods In Types

  • SCHED_NONE
  • SCHED_RR
  • domain
  • schedulingPolicy

Crypto

The crypto externs already exists in GCC, therefore the extern's namespace is added as `crypto.

types-v8/crypto.d.ts(10,14): warningTS0: type/symbolconflictforCertificate,using{?}fornow
  • Fix the Certificate conflict.

Missing Methods In Types

  • Cipheriv
  • Decipheriv
  • DiffieHellmanGroup
  • Sign
  • constants
  • createDiffieHellmanGroup
  • prng
  • rng
  • setEngine

Dns

types-v8/dns.d.ts(272,7): warningTS0: unhandledanonymoustypewithmultiplecallsignaturestypes-v8/dns.d.ts(273,7): warningTS0: unhandledanonymoustypewithmultiplecallsignaturestypes-v8/dns.d.ts(274,7): warningTS0: unhandledanonymoustypewithmultiplecallsignatures

The Resolver class has resolve, resolve4, resolve6 methods which it references in its definition, however those methods have multiple call signatures.

exportfunctionresolve(hostname: string,callback: (err: NodeJS.ErrnoException,addresses: string[])=>void): void;exportfunctionresolve(hostname: string,rrtype: "A",callback: (err: NodeJS.ErrnoException,addresses: string[])=>void): void;exportfunctionresolve(hostname: string,rrtype: "AAAA",callback: (err: NodeJS.ErrnoException,addresses: string[])=>void): void;// + N moreexportclassResolver{
...
resolve: typeofresolve;resolve4: typeofresolve4;resolve6: typeofresolve6;

This means the externs cannot be generated.

/** @type {?} */dns.Resolver.prototype.resolve;/** @type {?} */dns.Resolver.prototype.resolve4;/** @type {?} */dns.Resolver.prototype.resolve6;
  • Add a type for each of the methods.

Fs

// export interface FSWatcher extends events.EventEmitter {types-v8/fs.d.ts(46,3): warningTS0: omittinginterfacederivingfromclass: events.EventEmitter

Tls

// export interface ClearTextStream extends stream.Duplex {types-v8/tls.d.ts(327,3): warningTS0: omittinginterfacederivingfromclass: stream.Duplex

Http

Update Property Signatures.

/* TODO: PropertySignature: http.'accept' */
  • Add property signatures.
  • Add maxHeaderSize type.

Https

types-v8/https.d.ts(12,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/https.d.ts(25,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/https.d.ts(44,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/https.d.ts(45,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/https.d.ts(46,3): warningTS0: unhandledtypeflags: IncludesNonWideningType

Http2

// export interface Http2Stream extends stream.Duplex {types-v8/http2.d.ts(61,3): warningTS0: omittinginterfacederivingfromclass: stream.Duplex// export interface Http2Session extends events.EventEmitter {types-v8/http2.d.ts(248,3): warningTS0: omittinginterfacederivingfromclass: events.EventEmitter// export interface Http2Server extends net.Server {types-v8/http2.d.ts(405,3): warningTS0: omittinginterfacederivingfromclass: net.Server// export interface Http2SecureServer extends tls.Server {types-v8/http2.d.ts(449,3): warningTS0: omittinginterfacederivingfromclass: tls.Server

Zlib

types-v8/zlib.d.ts(32,3): warningTS0: omittinginterfacederivingfromclass: stream.Transformtypes-v8/zlib.d.ts(33,3): warningTS0: omittinginterfacederivingfromclass: stream.Transformtypes-v8/zlib.d.ts(34,3): warningTS0: omittinginterfacederivingfromclass: stream.Transformtypes-v8/zlib.d.ts(35,3): warningTS0: omittinginterfacederivingfromclass: stream.Transformtypes-v8/zlib.d.ts(36,3): warningTS0: omittinginterfacederivingfromclass: stream.Transformtypes-v8/zlib.d.ts(37,3): warningTS0: omittinginterfacederivingfromclass: stream.Transformtypes-v8/zlib.d.ts(38,3): warningTS0: omittinginterfacederivingfromclass: stream.Transform

Child_Process

types-v8/child_process.d.ts(10,3): warningTS0: omittinginterfacederivingfromclass: events.EventEmittertypes-v8/child_process.d.ts(126,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(129,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(133,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(139,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(144,7): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(145,7): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(147,7): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(172,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(174,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(198,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(199,3): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(213,7): warningTS0: unhandledtypeflags: IncludesNonWideningTypetypes-v8/child_process.d.ts(214,7): warningTS0: unhandledtypeflags: IncludesNonWideningType

Util

// export var inspect: {types-v8/util.d.ts(11,14): warningTS0: unhandledanonymoustype

Here, the inspect is defined in curly brackets for all of its possible signatures. tsickle does not understand that.

export varinspect: {(object: any,showHidden?: boolean,depth?: number|null,color?: boolean): string;(object: any,options: InspectOptions): string;
colors: {[color: string]: [number,number]|undefined}
styles: {[style: string]: string|undefined}
defaultOptions: InspectOptions;
custom: symbol;};
// export interface CustomPromisify<TCustom extends Function> extends Function {types-v8/util.d.ts(42,3): warningTS0: omittingheritagereferencetoatype/value conflict: Function

Punycode

// export var ucs2: ucs2;types-v8/punycode.d.ts(6,14): warningTS0: type/symbolconflictforucs2,using{?}fornow

Readline

// export interface ReadLine extends events.EventEmitter {types-v8/readline.d.ts(17,3): warningTS0: omittinginterfacederivingfromclass: events.EventEmitter
  • Renameinterface argument to _interface, otherwise the following error is shown:
    @externs/nodejs/v8/readline.js:185: ERROR-Parseerror.')'expectedreadline.emitKeypressEvents=function(stream,interface){};^

Repl

// export class Recoverable extends SyntaxError {types-v8/repl.d.ts(65,3): warningTS0: omittingheritagereferencetoatype/value conflict: SyntaxError

util

node_modules/util/index.js:11: WARNING-PropertygetSystemErrorName never definedonutilgetSystemErrorName,^^^^^^^^^^^^^^^^^^

-[x] Adding to util.getSystemErrorName to externs manually.

querystring

-[x] Add decode and encode aliases to parse and stringify.

net

-[x] Add the Stream alias to Socket (currently the type is incorrect, i.e., /** @type {net.Socket} */ net.Stream. This assigned the instance type rather than constructor type.

WIP

Currently, after some ignored properties and methods not defined in externs, there are still warnings that have not been handled.

node_modules/buffer/index.js:6: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyconstants never definedonbufferconstants,^^^^^^^^^node_modules/buffer/index.js:7: WARNING-[JSC_INEXISTENT_PROPERTY]PropertykMaxLength never definedonbufferkMaxLength,^^^^^^^^^^node_modules/buffer/index.js:8: WARNING-[JSC_INEXISTENT_PROPERTY]PropertykStringMaxLength never definedonbufferkStringMaxLength,^^^^^^^^^^^^^^^^node_modules/console/index.js:6: WARNING-[JSC_INEXISTENT_PROPERTY]Propertycontext never definedonConsolecontext,^^^^^^^node_modules/constants/index.js:4: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyCOPYFILE_EXCL never definedonconstantsCOPYFILE_EXCL,^^^^^^^^^^^^^node_modules/constants/index.js:27: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyEDQUOT never definedonconstantsEDQUOT,^^^^^^node_modules/constants/index.js:44: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyEMULTIHOP never definedonconstantsEMULTIHOP,^^^^^^^^^node_modules/constants/index.js:95: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyESTALE never definedonconstantsESTALE,^^^^^^node_modules/constants/index.js:103: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyOPENSSL_VERSION_NUMBER never definedonconstantsOPENSSL_VERSION_NUMBER,^^^^^^^^^^^^^^^^^^^^^^node_modules/constants/index.js:125: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyRSA_PSS_SALTLEN_AUTO never definedonconstantsRSA_PSS_SALTLEN_AUTO,^^^^^^^^^^^^^^^^^^^^node_modules/constants/index.js:126: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyRSA_PSS_SALTLEN_DIGEST never definedonconstantsRSA_PSS_SALTLEN_DIGEST,^^^^^^^^^^^^^^^^^^^^^^node_modules/constants/index.js:127: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyRSA_PSS_SALTLEN_MAX_SIGN never definedonconstantsRSA_PSS_SALTLEN_MAX_SIGN,^^^^^^^^^^^^^^^^^^^^^^^^node_modules/constants/index.js:139: WARNING-[JSC_INEXISTENT_PROPERTY]PropertySIGINFO never definedonconstantsSIGINFO,^^^^^^^node_modules/constants/index.js:216: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyUV_FS_COPYFILE_EXCL never definedonconstantsUV_FS_COPYFILE_EXCL,^^^^^^^^^^^^^^^^^^^node_modules/domain/index.js:4: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyactive never definedondomainactive,^^^^^^node_modules/domain/index.js:6: WARNING-[JSC_INEXISTENT_PROPERTY]PropertycreateDomain never definedondomaincreateDomain,^^^^^^^^^^^^node_modules/http2/index.js:3: WARNING-[JSC_BAD_PRIVATE_PROPERTY_ACCESS]AccesstoprivatepropertyHttp2ServerRequestof{ClientHttp2Session: (typeofhttp2.ClientHttp2Session),ClientHttp2Stream: (typeofhttp2.ClientHttp2Stream),ClientSessionOptions: None,ClientSessionRequestOptions: (typeofhttp2.ClientSessionRequestOptions),Http2SecureServer: (typeofhttp2.Http2SecureServer),Http2Server: (typeofhttp2.Http2Server),Http2ServerRequest: (typeofhttp2.Http2ServerRequest),Http2ServerResponse: (typeofhttp2.Http2ServerResponse),Http2Session: (typeofhttp2.Http2Session),Http2Stream: (typeofhttp2.Http2Stream), ...
}notallowedhere.Http2ServerRequest,^^^^^^^^^^^^^^^^^^node_modules/http2/index.js:4: WARNING-[JSC_BAD_PRIVATE_PROPERTY_ACCESS]AccesstoprivatepropertyHttp2ServerResponseof{ClientHttp2Session: (typeofhttp2.ClientHttp2Session),ClientHttp2Stream: (typeofhttp2.ClientHttp2Stream),ClientSessionOptions: None,ClientSessionRequestOptions: (typeofhttp2.ClientSessionRequestOptions),Http2SecureServer: (typeofhttp2.Http2SecureServer),Http2Server: (typeofhttp2.Http2Server),Http2ServerRequest: (typeofhttp2.Http2ServerRequest),Http2ServerResponse: (typeofhttp2.Http2ServerResponse),Http2Session: (typeofhttp2.Http2Session),Http2Stream: (typeofhttp2.Http2Stream), ...
}notallowedhere.Http2ServerResponse,^^^^^^^^^^^^^^^^^^^node_modules/process/index.js:7: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyassert never definedonNodeJS.Processassert,^^^^^^node_modules/process/index.js:8: WARNING-[JSC_INEXISTENT_PROPERTY]Propertybinding never definedonNodeJS.Processbinding,^^^^^^^node_modules/process/index.js:14: WARNING-[JSC_INEXISTENT_PROPERTY]Propertydlopen never definedonNodeJS.Processdlopen,^^^^^^node_modules/process/index.js:21: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyfeatures never definedonNodeJS.Processfeatures,^^^^^^^^node_modules/process/index.js:28: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyinitgroups never definedonNodeJS.Processinitgroups,^^^^^^^^^^node_modules/process/index.js:32: WARNING-[JSC_INEXISTENT_PROPERTY]PropertymoduleLoadList never definedonNodeJS.ProcessmoduleLoadList,^^^^^^^^^^^^^^node_modules/process/index.js:37: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyppid never definedonNodeJS.Processppid,^^^^node_modules/process/index.js:38: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyreallyExit never definedonNodeJS.ProcessreallyExit,^^^^^^^^^^node_modules/repl/index.js:4: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyREPL_MODE_MAGIC never definedonreplREPL_MODE_MAGIC,^^^^^^^^^^^^^^^node_modules/repl/index.js:5: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyREPL_MODE_SLOPPY never definedonreplREPL_MODE_SLOPPY,^^^^^^^^^^^^^^^^node_modules/repl/index.js:6: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyREPL_MODE_STRICT never definedonreplREPL_MODE_STRICT,^^^^^^^^^^^^^^^^node_modules/repl/index.js:9: WARNING-[JSC_INEXISTENT_PROPERTY]Propertywriter never definedonreplwriter,^^^^^^node_modules/timers/index.js:3: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyactive never definedontimersactive,^^^^^^node_modules/timers/index.js:7: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyenroll never definedontimersenroll,^^^^^^node_modules/timers/index.js:11: WARNING-[JSC_INEXISTENT_PROPERTY]Propertyunenroll never definedontimersunenroll,^^^^^^^^node_modules/tls/index.js:5: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyDEFAULT_CIPHERS never definedontlsDEFAULT_CIPHERS,^^^^^^^^^^^^^^^node_modules/tls/index.js:7: WARNING-[JSC_INEXISTENT_PROPERTY]PropertySLAB_BUFFER_SIZE never definedontlsSLAB_BUFFER_SIZE,^^^^^^^^^^^^^^^^node_modules/tls/index.js:13: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyconvertALPNProtocols never definedontlsconvertALPNProtocols,^^^^^^^^^^^^^^^^^^^^node_modules/tls/index.js:14: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyconvertNPNProtocols never definedontlsconvertNPNProtocols,^^^^^^^^^^^^^^^^^^^node_modules/tls/index.js:19: WARNING-[JSC_INEXISTENT_PROPERTY]PropertyparseCertString never definedontlsparseCertString,^^^^^^^^^^^^^^^0error(s),38warning(s),97.5% typed

Copyright

The types copyright belongs to their authors.

Type definitions for Node.js 8.10 by:

Taken from https://github.com/DefinitelyTyped/DefinitelyTyped

Art Deco© Art Deco for Depack 2019Tech Nation VisaTech Nation Visa Sucks

About

The Externs For Node.JS.

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages