fibjs / fib-types

fibjs's *.d.ts files for internal modules.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NOTICE This repo had been migrated to @fibjs/types.

fib-types

fibjs's *.d.ts files for internal modules.

Usage

npm i -S @types/fibjs

Hint with IDE

if you use some IDE supporting auto-complete feature for typescript(such as Visual Studio Code), auto-complete platte would display when you typing sub-characters of module name('fs', 'vm' etc)

To enable autocomplate of Visual Studio Code, you must use import keyword to introduce the module rather than 'require', fibjs would auto compile it with internal typescript compiler.

// just write
import * as fs from 'fs' // right

// NOT
import fs from 'fs' // wrong

Notice As of internal modules, not like latest nodejs, fibjs export one internal module without equivalent 'default' member, that is, fibjs's internal module isn't esmodule style, it's CommonJs, so you must use import * as xxx from 'xxx' rather than import xxx from 'xxx'

TODO

  • Basic type definition for internal C++ modules
  • Basic type definition for internal Javascript modules
  • For Every Module, Import its dependency Interface instead(now I introduce all interfaces)

About

fibjs's *.d.ts files for internal modules.

License:GNU General Public License v3.0


Languages

Language:TypeScript 100.0%