Socket
Socket
Sign inDemoInstall

@types/doctrine

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/doctrine - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

276

doctrine/index.d.ts

@@ -21,38 +21,38 @@ // Type definitions for doctrine the JSDoc parser

interface Options {
/**
* Set to `true` to delete the leading `/**`, any `*` that begins a line,
* and the trailing `* /` from the source text. Default: `false`.
*/
unwrap?: boolean | undefined;
/**
* An array of tags to return. When specified, Doctrine returns
* only tags in this array. For example, if `tags` is `["param"]`, then only
* `@param` tags will be returned. Default: `null`.
*/
tags?: string[] | undefined;
/**
* set to `true` to keep parsing even when syntax errors occur. Default:
* `false`.
*/
recoverable?: boolean | undefined;
/**
* Set to `true` to allow optional parameters to be specified in brackets
* (`@param {string} [foo]`). Default: `false`.
*/
sloppy?: boolean | undefined;
/**
* Set to `true` to throw an error when syntax errors occur. If false then
* errors will be added to `tag.errors` instead.
*/
strict?: boolean | undefined;
/**
* Set to `true` to preserve leading and trailing whitespace when extracting
* comment text.
*/
preserveWhitespace?: boolean | undefined;
/**
* Set to `true` to add `lineNumber` to each node, specifying the line on
* which the node is found in the source. Default: `false`.
*/
lineNumbers?: boolean | undefined;
/**
* Set to `true` to delete the leading `/**`, any `*` that begins a line,
* and the trailing `* /` from the source text. Default: `false`.
*/
unwrap?: boolean | undefined;
/**
* An array of tags to return. When specified, Doctrine returns
* only tags in this array. For example, if `tags` is `["param"]`, then only
* `@param` tags will be returned. Default: `null`.
*/
tags?: string[] | undefined;
/**
* set to `true` to keep parsing even when syntax errors occur. Default:
* `false`.
*/
recoverable?: boolean | undefined;
/**
* Set to `true` to allow optional parameters to be specified in brackets
* (`@param {string} [foo]`). Default: `false`.
*/
sloppy?: boolean | undefined;
/**
* Set to `true` to throw an error when syntax errors occur. If false then
* errors will be added to `tag.errors` instead.
*/
strict?: boolean | undefined;
/**
* Set to `true` to preserve leading and trailing whitespace when extracting
* comment text.
*/
preserveWhitespace?: boolean | undefined;
/**
* Set to `true` to add `lineNumber` to each node, specifying the line on
* which the node is found in the source. Default: `false`.
*/
lineNumbers?: boolean | undefined;
}

@@ -64,5 +64,5 @@

interface Annotation {
/** The overall description of the thing being documented. */
description: string;
tags: Tag[];
/** The overall description of the thing being documented. */
description: string;
tags: Tag[];
}

@@ -84,85 +84,135 @@

* value: {type: 'NameExpression', name: 'String'}}]}}
*
*/
export interface Tag {
/** The title of the jsdoc tag. e.g. `@foo` will have a title of 'foo'. */
title: string;
/** The name of the thing this tag is documenting, if any. */
name?: string | undefined;
/** The description of the thing this tag is documenting. */
description: string|null;
/** The type of the thing this tag is documenting. */
type?: Type|null | undefined;
kind?: string | undefined;
/** Any errors that were encountered in parsing the tag. */
errors?: string[] | undefined;
/** The title of the jsdoc tag. e.g. `@foo` will have a title of 'foo'. */
title: string;
/** The name of the thing this tag is documenting, if any. */
name?: string | undefined;
/** The description of the thing this tag is documenting. */
description: string | null;
/** The type of the thing this tag is documenting. */
type?: Type | null | undefined;
kind?: string | undefined;
/** Any errors that were encountered in parsing the tag. */
errors?: string[] | undefined;
}
export type Type =
(type.AllLiteral | type.ArrayType | type.FieldType | type.FunctionType |
type.NameExpression | type.NonNullableType | type.NullableLiteral |
type.NullableType | type.NullLiteral | type.OptionalType |
type.ParameterType | type.RecordType | type.RestType |
type.TypeApplication | type.UndefinedLiteral | type.UnionType |
type.VoidLiteral);
| type.AllLiteral
| type.ArrayType
| type.FieldType
| type.FunctionType
| type.NameExpression
| type.NonNullableType
| type.NullableLiteral
| type.NullableType
| type.NullLiteral
| type.OptionalType
| type.ParameterType
| type.RecordType
| type.RestType
| type.TypeApplication
| type.UndefinedLiteral
| type.UnionType
| type.VoidLiteral;
export namespace type {
export interface AllLiteral { type: 'AllLiteral' }
export interface ArrayType { type: 'ArrayType', elements: Type[] }
export interface FieldType { type: 'FieldType', key: string, value?: Type | undefined }
export interface FunctionType {
type: 'FunctionType';
'this': Type;
'new': Type, params: Type[];
result: Type;
}
export interface NameExpression { type: 'NameExpression', name: string }
export interface NonNullableType {
type: 'NonNullableType', prefix: boolean, expression: Type
}
export interface NullableLiteral { type: 'NullableLiteral' }
export interface NullableType {
type: 'NullableType', prefix: boolean, expression: Type
}
export interface NullLiteral { type: 'NullLiteral' }
export interface OptionalType { type: 'OptionalType', expression: Type }
export interface ParameterType {
type: 'ParameterType', name: string, expression: Type
}
export interface RecordType { type: 'RecordType', fields: Type[] }
export interface RestType {
type: 'RestType';
expression?: Type | undefined;
}
export interface TypeApplication {
type: 'TypeApplication', expression: Type, applications: Type[]
}
export interface UndefinedLiteral { type: 'UndefinedLiteral' }
export interface UnionType { type: 'UnionType', elements: Type[] }
export interface VoidLiteral { type: 'VoidLiteral' }
export interface AllLiteral {
type: "AllLiteral";
}
export interface ArrayType {
type: "ArrayType";
elements: Type[];
}
export interface FieldType {
type: "FieldType";
key: string;
value?: Type | undefined;
}
export interface FunctionType {
type: "FunctionType";
"this": Type;
"new": Type;
params: Type[];
result: Type;
}
export interface NameExpression {
type: "NameExpression";
name: string;
}
export interface NonNullableType {
type: "NonNullableType";
prefix: boolean;
expression: Type;
}
export interface NullableLiteral {
type: "NullableLiteral";
}
export interface NullableType {
type: "NullableType";
prefix: boolean;
expression: Type;
}
export interface NullLiteral {
type: "NullLiteral";
}
export interface OptionalType {
type: "OptionalType";
expression: Type;
}
export interface ParameterType {
type: "ParameterType";
name: string;
expression: Type;
}
export interface RecordType {
type: "RecordType";
fields: Type[];
}
export interface RestType {
type: "RestType";
expression?: Type | undefined;
}
export interface TypeApplication {
type: "TypeApplication";
expression: Type;
applications: Type[];
}
export interface UndefinedLiteral {
type: "UndefinedLiteral";
}
export interface UnionType {
type: "UnionType";
elements: Type[];
}
export interface VoidLiteral {
type: "VoidLiteral";
}
export function stringify(type: Type): string;
export function parseType(src: string, options?: {midstream: boolean}): Type;
export function parseParamType(
src: string, options?: {midstream: boolean}): Type;
export function stringify(type: Type): string;
export function parseType(src: string, options?: { midstream: boolean }): Type;
export function parseParamType(
src: string,
options?: { midstream: boolean },
): Type;
export const Syntax: {
NullableLiteral: 'NullableLiteral',
AllLiteral: 'AllLiteral',
NullLiteral: 'NullLiteral',
UndefinedLiteral: 'UndefinedLiteral',
VoidLiteral: 'VoidLiteral',
UnionType: 'UnionType',
ArrayType: 'ArrayType',
RecordType: 'RecordType',
FieldType: 'FieldType',
FunctionType: 'FunctionType',
ParameterType: 'ParameterType',
RestType: 'RestType',
NonNullableType: 'NonNullableType',
OptionalType: 'OptionalType',
NullableType: 'NullableType',
NameExpression: 'NameExpression',
TypeApplication: 'TypeApplication'
}
export const Syntax: {
NullableLiteral: "NullableLiteral";
AllLiteral: "AllLiteral";
NullLiteral: "NullLiteral";
UndefinedLiteral: "UndefinedLiteral";
VoidLiteral: "VoidLiteral";
UnionType: "UnionType";
ArrayType: "ArrayType";
RecordType: "RecordType";
FieldType: "FieldType";
FunctionType: "FunctionType";
ParameterType: "ParameterType";
RestType: "RestType";
NonNullableType: "NonNullableType";
OptionalType: "OptionalType";
NullableType: "NullableType";
NameExpression: "NameExpression";
TypeApplication: "TypeApplication";
};
}

@@ -169,0 +219,0 @@

{
"name": "@types/doctrine",
"version": "0.0.6",
"version": "0.0.7",
"description": "TypeScript definitions for doctrine the JSDoc parser",

@@ -23,4 +23,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/doctrine",

"dependencies": {},
"typesPublisherContentHash": "a27a5abf31a8b9b75e0f721e2cf44639ac7e7beab3030292391b0b4b4e6cd52e",
"typeScriptVersion": "4.3"
"typesPublisherContentHash": "7f4a86a5034d5b7e57ba095ca54f8e2bc13cb5dbabc3eac47c58b0d62889a455",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Fri, 25 Aug 2023 17:33:40 GMT
* Last updated: Fri, 22 Sep 2023 20:29:40 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc