
Security News
CISA Rebuffs Funding Concerns as CVE Foundation Draws Criticism
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
@withfig/autocomplete-types
Advanced tools
This is the package providing types for our autocomplete app.
Configure the global Fig namespace in your tsconfig.json
:
{
"compilerOptions": {
// you may get some typecheck errors if you are using some node packages like "fs"
// just include "node" in the below array. Same for "jest", "chai"...and so on.
"types": ["@withfig/autocomplete-types"]
},
}
node_modules/
folder and reinstall again the packagesIf you are still unable to use @withfig/autocomplete-types
, please open an issue here.
We use TSDocs to comment the exported symbols of the Fig namespace. In our docs generator, which is executed on our backend each time the types are updated, we perform some custom Typescript AST traversals and we retrieve all the exported nodes with their TSDoc comments.
For Fig members: see the website repo to find out more about the custom generator we are using for docs
First of all we generate an entire page on the website for each of the main interfaces available in the Fig namespace, all the typealiases go to the "Others" page.
Interface
Typealias
@param <name of the param> <some description>
. It can be provided multiple times for different params.
/**
* @param value some description for the value param
*/
type Callback = (value) => void
/**
* @param value some description for the value param
* @returns nothing
*/
type Callback = (value) => void
Discussion
section.Interface
member@param <name of the param> <some description>
. It can be provided multiple times for different params.
/**
* @param value some description for the value param
*/
memberName: (value) => void
/**
* @param value some description for the value param
* @returns nothing
*/
memberName: (value) => void
Discussion
section./**
* @deprecated This message is optional
*/
export const didChange = {
subscribe: (notification) => { },
}
We perform some analysis over the types before generating the docs. In particular all the types from the Fig namespace are replaced recursively with Typescript primitive types like functions, string...
For Interface members
and Typealiases
are available some additional tags that prevent complete or partial replacements of the Types.
// e.g. with the irreplaced tag
type Data = string
/**
* @irreplaced
*/
type Res = Data
// will output
type Data = string
type Res = Data
// e.g. without the irreplaced tag
type Data = string
type Res = Data
// will output
type Data = string
type Res = string
// e.g. with the irreplaceable tag
/**
* @irreplaceable
*/
type Data = string
type Res = Data
// will output
type Data = string
type Res = Data
// e.g. without the irreplaceable tag
type Data = string
type Res = Data
// will output
type Data = string
type Res = string
IMPORTANT: when using types that reference themselves add an
@irreplaceable
tag to them (see SubcommandDiff)
FAQs
Typings for fig autocomplete specs and other tools
The npm package @withfig/autocomplete-types receives a total of 1,835 weekly downloads. As such, @withfig/autocomplete-types popularity was classified as popular.
We found that @withfig/autocomplete-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.
Product
Module Reachability filters out unreachable CVEs so you can focus on vulnerabilities that actually matter to your application.