Spec-Zone.ru › Deno 2

Linter

Интерфейсы и вспомогательные средства для написания и тестирования пользовательских правил линтинга.

Например: Deno.lint.Plugin


функция Deno.lint.runPlugin

нестабильный
runPlugin(
plugin: Plugin,
fileName: string,
source: string,
): Diagnostic[]

Этот API полезен для тестирования плагинов линтинга.

Выбрасывает ошибку, если используется не в подкоманде deno test.

Параметры

plugin: Plugin
fileName: string
source: string

Тип возвращаемого значения

Diagnostic[]

интерфейс Deno.lint.AccessorProperty

нестабильный

Свойства

type: "AccessorProperty"
range: Range
declare: boolean
computed: boolean
optional: boolean
override: boolean
readonly: boolean
static: boolean
accessibility: Accessibility | undefined
decorators: Decorator[]
key:
Expression
| Identifier
| NumberLiteral
| StringLiteral
value: Expression | null
parent: ClassBody

интерфейс Deno.lint.ArrayExpression

нестабильный

Литерал массива

Свойства

type: "ArrayExpression"
range: Range
elements: Array<Expression | SpreadElement>
parent: Node

интерфейс Deno.lint.ArrayPattern

нестабильный

Деструктуризация массива.

Свойства

type: "ArrayPattern"
range: Range
optional: boolean
typeAnnotation: TSTypeAnnotation | undefined
elements: Array<
ArrayPattern
| AssignmentPattern
| Identifier
| MemberExpression
| ObjectPattern
| RestElement
| null
>
parent: Node

интерфейс Deno.lint.ArrowFunctionExpression

нестабильный

Выражение стрелочной функции

Свойства

type: "ArrowFunctionExpression"
range: Range
async: boolean
generator: boolean
id: null
typeParameters: TSTypeParameterDeclaration | undefined
params: Parameter[]
returnType: TSTypeAnnotation | undefined
body: BlockStatement | Expression
parent: Node

интерфейс Deno.lint.AssignmentExpression

нестабильный

Обновление переменной или свойства.

Свойства

type: "AssignmentExpression"
range: Range
operator:
"&&="
| "&="
| "**="
| "*="
| "||="
| "|="
| "^="
| "="
| ">>="
| ">>>="
| "<<="
| "-="
| "%="
| "+="
| "??="
| "/="
left: Expression
right: Expression
parent: Node

интерфейс Deno.lint.AssignmentPattern

нестабильный

Задание значений по умолчанию в параметрах.

Свойства

type: "AssignmentPattern"
range: Range
left:
ArrayPattern
| ObjectPattern
| Identifier
right: Expression
parent: Node

интерфейс Deno.lint.AwaitExpression

нестабильный

Ожидание Promise и получение его выполненного значения.

Свойства

type: "AwaitExpression"
range: Range
argument: Expression
parent: Node

интерфейс Deno.lint.BigIntLiteral

нестабильный

Представляет числа, слишком большие или слишком маленькие для представления типом number.

const a = 9007199254740991n;

Свойства

type: "Literal"
range: Range
raw: string
bigint: string
value: bigint
parent: Node

интерфейс Deno.lint.BinaryExpression

нестабильный

Сравнение левого и правого значений с помощью заданного оператора.

Свойства

type: "BinaryExpression"
range: Range
operator:
"&"
| "**"
| "*"
| "||"
| "|"
| "^"
| "==="
| "=="
| "!=="
| "!="
| ">="
| ">>>"
| ">>"
| ">"
| "in"
| "instanceof"
| "<="
| "<<"
| "<"
| "-"
| "%"
| "+"
| "/"
left: Expression | PrivateIdentifier
right: Expression
parent: Node

интерфейс Deno.lint.BlockComment

нестабильный

Блочный комментарий, который может занимать несколько строк

Свойства

type: "Block"
range: Range
value: string

интерфейс Deno.lint.BlockStatement

нестабильный

Свойства

type: "BlockStatement"
range: Range
body: Statement[]
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.BooleanLiteral

нестабильный

Либо true, либо false

Свойства

type: "Literal"
range: Range
raw: "false" | "true"
value: boolean
parent: Node

интерфейс Deno.lint.BreakStatement

нестабильный

Прерывает любой цикл или помеченный оператор, например:

while (true) {
  break;
}

for (let i = 0; i < 10; i++) {
  if (i > 5) break;
}

Свойства

type: "BreakStatement"
range: Range
label: Identifier | null
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.CallExpression

нестабильный

Вызов функции.

Свойства

type: "CallExpression"
range: Range
optional: boolean
callee: Expression
typeArguments: TSTypeParameterInstantiation | null
arguments: Array<Expression | SpreadElement>
parent: Node

интерфейс Deno.lint.CatchClause

нестабильный

Блок catch оператора try/catch

Свойства

type: "CatchClause"
range: Range
param:
ArrayPattern
| ObjectPattern
| Identifier
| null
body: BlockStatement
parent: TryStatement

интерфейс Deno.lint.ChainExpression

нестабильный

ChainExpression

Свойства

type: "ChainExpression"
range: Range
expression:
CallExpression
| MemberExpression
| TSNonNullExpression
parent: Node

интерфейс Deno.lint.ClassBody

нестабильный

Представляет тело класса и содержит все его члены

Свойства

type: "ClassBody"
range: Range
body: Array<
AccessorProperty
| MethodDefinition
| PropertyDefinition
| StaticBlock
| TSAbstractMethodDefinition
| TSAbstractPropertyDefinition
| TSIndexSignature
>
parent: ClassDeclaration | ClassExpression

интерфейс Deno.lint.ClassDeclaration

нестабильный

Объявляет класс в текущей области видимости

Свойства

type: "ClassDeclaration"
range: Range
declare: boolean
abstract: boolean
id: Identifier | null
superClass:
ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| CallExpression
| ClassExpression
| FunctionExpression
| Identifier
| JSXElement
| JSXFragment
| Literal
| TemplateLiteral
| MemberExpression
| MetaProperty
| ObjectExpression
| ObjectPattern
| SequenceExpression
| Super
| TaggedTemplateExpression
| ThisExpression
| TSAsExpression
| TSNonNullExpression
| TSTypeAssertion
| null
implements: TSClassImplements[]
body: ClassBody
parent: Node

интерфейс Deno.lint.ClassExpression

нестабильный

Аналогичен ClassDeclaration, но объявляет класс в виде выражения. Главное отличие состоит в том, что имя класса (=id) можно опустить.

Свойства

type: "ClassExpression"
range: Range
declare: boolean
abstract: boolean
id: Identifier | null
superClass:
ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| CallExpression
| ClassExpression
| FunctionExpression
| Identifier
| JSXElement
| JSXFragment
| Literal
| TemplateLiteral
| MemberExpression
| MetaProperty
| ObjectExpression
| ObjectPattern
| SequenceExpression
| Super
| TaggedTemplateExpression
| ThisExpression
| TSAsExpression
| TSNonNullExpression
| TSTypeAssertion
| null
superTypeArguments: TSTypeParameterInstantiation | undefined
typeParameters: TSTypeParameterDeclaration | undefined
implements: TSClassImplements[]
body: ClassBody
parent: Node

интерфейс Deno.lint.ConditionalExpression

нестабильный

Условный оператор в строке.

Свойства

type: "ConditionalExpression"
range: Range
test: Expression
consequent: Expression
alternate: Expression
parent: Node

интерфейс Deno.lint.ContinueStatement

нестабильный

Завершает текущий цикл и переходит к следующей итерации.

Свойства

type: "ContinueStatement"
range: Range
label: Identifier | null
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.DebuggerStatement

нестабильный

Оператор debugger;.

Свойства

type: "DebuggerStatement"
range: Range
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.Decorator

нестабильный

Экспериментальная возможность: декораторы

Свойства

type: "Decorator"
range: Range
expression:
ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| CallExpression
| ClassExpression
| FunctionExpression
| Identifier
| JSXElement
| JSXFragment
| Literal
| TemplateLiteral
| MemberExpression
| MetaProperty
| ObjectExpression
| ObjectPattern
| SequenceExpression
| Super
| TaggedTemplateExpression
| ThisExpression
| TSAsExpression
| TSNonNullExpression
| TSTypeAssertion
parent: Node

интерфейс Deno.lint.Diagnostic

нестабильный

Свойства

id: string
message: string
hint: string
необязательный
range: Range
fix: Fix[]
необязательный

интерфейс Deno.lint.DoWhileStatement

нестабильный

Повторяет цикл, пока проверочное выражение истинно.

Свойства

type: "DoWhileStatement"
range: Range
test: Expression
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.ExportAllDeclaration

нестабильный

Свойства

type: "ExportAllDeclaration"
range: Range
exportKind: "type" | "value"
exported: Identifier | null
source: StringLiteral
attributes: ImportAttribute[]
parent: Node

интерфейс Deno.lint.ExportDefaultDeclaration

нестабильный

Свойства

type: "ExportDefaultDeclaration"
range: Range
declaration:
ClassDeclaration
| Expression
| FunctionDeclaration
| TSDeclareFunction
| TSEnumDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSTypeAliasDeclaration
| VariableDeclaration
exportKind: "type" | "value"
parent:
BlockStatement
| Program
| TSModuleBlock

интерфейс Deno.lint.ExportNamedDeclaration

нестабильный

Свойства

type: "ExportNamedDeclaration"
range: Range
exportKind: "type" | "value"
specifiers: ExportSpecifier[]
declaration:
ClassDeclaration
| FunctionDeclaration
| TSDeclareFunction
| TSEnumDeclaration
| TSImportEqualsDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSTypeAliasDeclaration
| VariableDeclaration
| null
source: StringLiteral | null
attributes: ImportAttribute[]
parent:
BlockStatement
| Program
| TSModuleBlock

интерфейс Deno.lint.ExportSpecifier

нестабильный

Свойства

type: "ExportSpecifier"
range: Range
exportKind: "type" | "value"
exported: Identifier | StringLiteral
local: Identifier | StringLiteral
parent: ExportNamedDeclaration

интерфейс Deno.lint.ExpressionStatement

нестабильный

Инструкция, содержащая выражение.

Свойства

type: "ExpressionStatement"
range: Range
expression: Expression
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.Fix

нестабильный

Свойства

range: Range
text: string
необязательный

интерфейс Deno.lint.Fixer

нестабильный

Методы

insertTextAfter(
node: Node,
text: string,
): Fix
insertTextAfterRange(
range: Range,
text: string,
): Fix
insertTextBefore(
node: Node,
text: string,
): Fix
insertTextBeforeRange(
range: Range,
text: string,
): Fix
remove(node: Node): Fix
removeRange(range: Range): Fix
replaceText(
node: Node,
text: string,
): Fix
replaceTextRange(
range: Range,
text: string,
): Fix

интерфейс Deno.lint.ForInStatement

нестабильный

Перебирает все перечисляемые строковые свойства объекта.

Свойства

type: "ForInStatement"
range: Range
left: Expression | VariableDeclaration
right: Expression
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.ForOfStatement

нестабильный

Перебирает последовательность значений, полученных из итератора.

Свойства

type: "ForOfStatement"
range: Range
await: boolean
left: Expression | VariableDeclaration
right: Expression
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.ForStatement

нестабильный

Классический цикл for.

Свойства

type: "ForStatement"
range: Range
init:
Expression
| VariableDeclaration
| null
test: Expression | null
update: Expression | null
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.FunctionDeclaration

нестабильный

Объявляет функцию в текущей области видимости

Свойства

type: "FunctionDeclaration"
range: Range
declare: boolean
async: boolean
generator: boolean
id: Identifier | null
typeParameters: TSTypeParameterDeclaration | undefined
returnType: TSTypeAnnotation | undefined
body: BlockStatement | null
params: Parameter[]
parent:
BlockStatement
| ExportDefaultDeclaration
| ExportNamedDeclaration
| Program

интерфейс Deno.lint.FunctionExpression

нестабильный

Объявляет функцию как выражение. Похоже на FunctionDeclaration, с необязательным именем (=id).

Свойства

type: "FunctionExpression"
range: Range
async: boolean
generator: boolean
id: Identifier | null
typeParameters: TSTypeParameterDeclaration | undefined
params: Parameter[]
returnType: TSTypeAnnotation | undefined
body: BlockStatement
parent: Node

интерфейс Deno.lint.Identifier

нестабильный

Именованный разработчиком узел. Может быть именем переменной, функции, параметра и т. д.

Свойства

type: "Identifier"
range: Range
name: string
optional: boolean
typeAnnotation: TSTypeAnnotation | undefined
parent: Node

интерфейс Deno.lint.IfStatement

нестабильный

Выполняет оператор, если условие истинно, в противном случае — альтернативный оператор, если он задан.

Свойства

type: "IfStatement"
range: Range
test: Expression
consequent: Statement
alternate: Statement | null
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.ImportAttribute

нестабильный

Свойства

type: "ImportAttribute"
range: Range
key: Identifier | Literal
value: Literal
parent:
ExportAllDeclaration
| ExportNamedDeclaration
| ImportDeclaration
| TSImportType

интерфейс Deno.lint.ImportDeclaration

нестабильный

Объявление импорта, например:

Свойства

type: "ImportDeclaration"
range: Range
importKind: "type" | "value"
source: StringLiteral
specifiers: Array<
ImportDefaultSpecifier
| ImportNamespaceSpecifier
| ImportSpecifier
>
attributes: ImportAttribute[]
parent: Node

интерфейс Deno.lint.ImportDefaultSpecifier

нестабильный

Свойства

type: "ImportDefaultSpecifier"
range: Range
local: Identifier
parent: ImportDeclaration

интерфейс Deno.lint.ImportExpression

нестабильный

Динамически импортирует модуль.

Свойства

type: "ImportExpression"
range: Range
source: Expression
options: Expression | null
parent: Node

интерфейс Deno.lint.ImportNamespaceSpecifier

нестабильный

Свойства

type: "ImportNamespaceSpecifier"
range: Range
local: Identifier
parent: ImportDeclaration

интерфейс Deno.lint.ImportSpecifier

нестабильный

Свойства

type: "ImportSpecifier"
range: Range
imported: Identifier | StringLiteral
local: Identifier
importKind: "type" | "value"
parent:
ExportAllDeclaration
| ExportNamedDeclaration
| ImportDeclaration

интерфейс Deno.lint.JSXAttribute

нестабильный

Атрибут JSX

Свойства

type: "JSXAttribute"
range: Range
name: JSXIdentifier | JSXNamespacedName
value:
JSXElement
| JSXExpressionContainer
| Literal
| null
parent: JSXOpeningElement

интерфейс Deno.lint.JSXClosingElement

нестабильный

Закрывающий тег JSXElement. Используется только в том случае, если элемент не является самозакрывающимся.

Свойства

type: "JSXClosingElement"
range: Range
name:
JSXIdentifier
| JSXMemberExpression
| JSXNamespacedName
parent: JSXElement

интерфейс Deno.lint.JSXClosingFragment

нестабильный

Закрывающий тег JSXFragment.

Свойства

type: "JSXClosingFragment"
range: Range
parent: JSXFragment

интерфейс Deno.lint.JSXElement

нестабильный

Элемент JSX.

Свойства

type: "JSXElement"
range: Range
openingElement: JSXOpeningElement
closingElement: JSXClosingElement | null
children: JSXChild[]
parent: Node

интерфейс Deno.lint.JSXEmptyExpression

нестабильный

Пустое выражение JSX.

Свойства

type: "JSXEmptyExpression"
range: Range
parent:
JSXAttribute
| JSXElement
| JSXFragment

интерфейс Deno.lint.JSXExpressionContainer

нестабильный

Вставляет обычное выражение JS в JSX.

Свойства

type: "JSXExpressionContainer"
range: Range
expression: Expression | JSXEmptyExpression
parent:
JSXAttribute
| JSXElement
| JSXFragment

интерфейс Deno.lint.JSXFragment

нестабильный

Обычно это узел-пропуск, позволяющий передать несколько соседних элементов, поскольку синтаксис JSX требует один корневой элемент.

Свойства

type: "JSXFragment"
range: Range
openingFragment: JSXOpeningFragment
closingFragment: JSXClosingFragment
children: JSXChild[]
parent: Node

интерфейс Deno.lint.JSXIdentifier

нестабильный

Пользовательский именованный идентификатор внутри JSX.

Свойства

type: "JSXIdentifier"
range: Range
name: string
parent:
JSXNamespacedName
| JSXOpeningElement
| JSXAttribute
| JSXClosingElement
| JSXMemberExpression

интерфейс Deno.lint.JSXMemberExpression

нестабильный

Выражение обращения к члену JSX.

Свойства

type: "JSXMemberExpression"
range: Range
object:
JSXIdentifier
| JSXMemberExpression
| JSXNamespacedName
property: JSXIdentifier
parent: JSXOpeningElement | JSXClosingElement

интерфейс Deno.lint.JSXNamespacedName

нестабильный

Имя с пространством имён в JSX

Свойства

type: "JSXNamespacedName"
range: Range
namespace: JSXIdentifier
name: JSXIdentifier
parent:
JSXOpeningElement
| JSXAttribute
| JSXClosingElement
| JSXMemberExpression

интерфейс Deno.lint.JSXOpeningElement

нестабильный

Открывающий тег JSXElement

Свойства

type: "JSXOpeningElement"
range: Range
selfClosing: boolean
name:
JSXIdentifier
| JSXMemberExpression
| JSXNamespacedName
attributes: Array<JSXAttribute | JSXSpreadAttribute>
typeArguments: TSTypeParameterInstantiation | undefined
parent: JSXElement

интерфейс Deno.lint.JSXOpeningFragment

нестабильный

Открывающий тег JSXFragment.

Свойства

type: "JSXOpeningFragment"
range: Range
parent: JSXFragment

интерфейс Deno.lint.JSXSpreadAttribute

нестабильный

Раскрывает объект в виде атрибутов JSX.

Свойства

type: "JSXSpreadAttribute"
range: Range
argument: Expression
parent: JSXOpeningElement

интерфейс Deno.lint.JSXText

нестабильный

Обычный текст в JSX.

Свойства

type: "JSXText"
range: Range
raw: string
value: string
parent: JSXElement | JSXFragment

интерфейс Deno.lint.LabeledStatement

нестабильный

Пользовательское управление потоком на основе меток.

Свойства

type: "LabeledStatement"
range: Range
label: Identifier
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.LineComment

нестабильный

Однострочный комментарий

Свойства

type: "Line"
range: Range
value: string

интерфейс Deno.lint.LogicalExpression

нестабильный

Цепочка выражений на основе указанного оператора

Свойства

type: "LogicalExpression"
range: Range
operator:
"&&"
| "??"
| "||"
left: Expression
right: Expression
parent: Node

интерфейс Deno.lint.MemberExpression

нестабильный

Выражение обращения к члену

Свойства

type: "MemberExpression"
range: Range
optional: boolean
computed: boolean
object: Expression
property:
Expression
| Identifier
| PrivateIdentifier
parent: Node

интерфейс Deno.lint.MetaProperty

нестабильный

Может быть import.meta или new.target.

Свойства

type: "MetaProperty"
range: Range
meta: Identifier
property: Identifier
parent: Node

интерфейс Deno.lint.MethodDefinition

нестабильный

Свойства

type: "MethodDefinition"
range: Range
declare: boolean
computed: boolean
optional: boolean
override: boolean
readonly: boolean
static: boolean
kind:
"constructor"
| "get"
| "method"
| "set"
accessibility: Accessibility | undefined
decorators: Decorator[]
key:
PrivateIdentifier
| Identifier
| NumberLiteral
| StringLiteral
| Expression
value: FunctionExpression | TSEmptyBodyFunctionExpression
parent: ClassBody

интерфейс Deno.lint.NewExpression

нестабильный

Создаёт новый экземпляр класса.

Свойства

type: "NewExpression"
range: Range
callee: Expression
typeArguments: TSTypeParameterInstantiation | undefined
arguments: Array<Expression | SpreadElement>
parent: Node

интерфейс Deno.lint.NullLiteral

нестабильный

Литерал null

Свойства

type: "Literal"
range: Range
raw: "null"
value: null
parent: Node

интерфейс Deno.lint.NumberLiteral

нестабильный

Числовой литерал

1;
1.2;

Свойства

type: "Literal"
range: Range
raw: string
value: number
parent: Node

интерфейс Deno.lint.ObjectExpression

нестабильный

Литерал объекта.

Свойства

type: "ObjectExpression"
range: Range
properties: Array<Property | SpreadElement>
parent: Node

интерфейс Deno.lint.ObjectPattern

нестабильный

Деструктурирует объект.

Свойства

type: "ObjectPattern"
range: Range
optional: boolean
typeAnnotation: TSTypeAnnotation | undefined
properties: Array<Property | RestElement>
parent: Node

интерфейс Deno.lint.Plugin

нестабильный

В файле плагина можно написать, например:

export default {
  name: "my-plugin",
  rules: {
    "no-foo": {
       create(ctx) {
         return {
            VariableDeclaration(node) {}
         }
       }
    }
  }
} satisfies Deno.lint.Plugin

Свойства

name: string
rules: Record<string, Rule>

интерфейс Deno.lint.PrivateIdentifier

нестабильный

Имена закрытых членов классов должны начинаться с #.

Свойства

type: "PrivateIdentifier"
range: Range
name: string
parent:
TSAbstractPropertyDefinition
| TSPropertySignature
| PropertyDefinition
| MethodDefinition
| BinaryExpression
| MemberExpression

интерфейс Deno.lint.Program

нестабильный

Свойства

type: "Program"
range: Range
sourceType: "module" | "script"
body: Statement[]
comments: Array<LineComment | BlockComment>

интерфейс Deno.lint.Property

нестабильный

Свойства

type: "Property"
range: Range
shorthand: boolean
computed: boolean
method: boolean
kind:
"get"
| "init"
| "set"
key:
Expression
| Identifier
| NumberLiteral
| StringLiteral
value:
AssignmentPattern
| ArrayPattern
| ObjectPattern
| Identifier
| Expression
| TSEmptyBodyFunctionExpression
parent: ObjectExpression | ObjectPattern

интерфейс Deno.lint.PropertyDefinition

нестабильный

Свойства

type: "PropertyDefinition"
range: Range
declare: boolean
computed: boolean
optional: boolean
override: boolean
readonly: boolean
static: boolean
accessibility: Accessibility | undefined
decorators: Decorator[]
key:
Expression
| Identifier
| NumberLiteral
| StringLiteral
| PrivateIdentifier
value: Expression | null
typeAnnotation: TSTypeAnnotation | undefined
parent: ClassBody

интерфейс Deno.lint.RegExpLiteral

нестабильный

Литерал регулярного выражения:

/foo(bar|baz)$/g

Свойства

type: "Literal"
range: Range
raw: string
regex: { flags: string; pattern: string; }
value: RegExp | null
parent: Node

интерфейс Deno.lint.ReportData

нестабильный

Свойства

node: Node
необязательный
range: Range
необязательный
message: string
hint: string
необязательный

Методы

fix(fixer: Fixer): Fix | Iterable<Fix>
необязательный

интерфейс Deno.lint.RestElement

нестабильный

Остаток параметров функции.

Свойства

type: "RestElement"
range: Range
typeAnnotation: TSTypeAnnotation | undefined
argument:
ArrayPattern
| AssignmentPattern
| Identifier
| MemberExpression
| ObjectPattern
| RestElement
parent: Node

интерфейс Deno.lint.ReturnStatement

нестабильный

Возвращает значение из функции.

Свойства

type: "ReturnStatement"
range: Range
argument: Expression | null
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.Rule

нестабильный

Методы

create(ctx: RuleContext): LintVisitor
destroy(ctx: RuleContext): void
необязательный

интерфейс Deno.lint.RuleContext

нестабильный

Свойства

id: string

Идентификатор выполняемого правила: <plugin-name>/<rule-name>

filename: string

Имя файла, который в данный момент проверяется линтером.

sourceCode: SourceCode

Вспомогательные методы для работы с исходным кодом.

Методы

report(data: ReportData): void

Сообщить об ошибке линтера.

getFilename(): string
устарело
getSourceCode(): SourceCode
устарело

интерфейс Deno.lint.SequenceExpression

нестабильный

Выполняет несколько выражений последовательно.

Свойства

type: "SequenceExpression"
range: Range
expressions: Expression[]
parent: Node

интерфейс Deno.lint.SourceCode

нестабильный

Свойства

text: string

Получить полный исходный код.

ast: Program

Получить корневой узел файла. Это всегда узел Program.

Методы

getText(node?: Node): string

Получить исходный текст узла. Не указывайте node, чтобы получить полный исходный код.

getAncestors(node: Node): Node[]

Возвращает массив предков текущего узла, не включая сам текущий узел.

getAllComments(): Array<LineComment | BlockComment>

Получить все комментарии в исходном коде.

getCommentsBefore(node: Node): Array<LineComment | BlockComment>

Получить предшествующие комментарии перед узлом.

getCommentsAfter(node: Node): Array<LineComment | BlockComment>

Получить последующие комментарии после узла.

getCommentsInside(node: Node): Array<LineComment | BlockComment>

Получить комментарии внутри узла.


интерфейс Deno.lint.SpreadElement

нестабильный

Свойства

type: "SpreadElement"
range: Range
argument: Expression
parent:
ArrayExpression
| CallExpression
| NewExpression
| ObjectExpression

интерфейс Deno.lint.StaticBlock

нестабильный

Блок статической инициализации класса.

Свойства

type: "StaticBlock"
range: Range
body: Statement[]
parent: ClassBody

интерфейс Deno.lint.StringLiteral

нестабильный

Строковый литерал

"foo";
'foo "bar"';

Свойства

type: "Literal"
range: Range
raw: string
value: string
parent: Node

интерфейс Deno.lint.Super

нестабильный

Ключевое слово super, используемое в классах.

Свойства

type: "Super"
range: Range
parent: Node

интерфейс Deno.lint.SwitchCase

нестабильный

Один вариант оператора SwitchStatement.

Свойства

type: "SwitchCase"
range: Range
test: Expression | null
consequent: Statement[]
parent: SwitchStatement

интерфейс Deno.lint.SwitchStatement

нестабильный

Сопоставляет выражение с последовательностью вариантов.

Свойства

type: "SwitchStatement"
range: Range
discriminant: Expression
cases: SwitchCase[]
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.TaggedTemplateExpression

нестабильный

Помеченное шаблонное выражение.

Свойства

type: "TaggedTemplateExpression"
range: Range
tag: Expression
typeArguments: TSTypeParameterInstantiation | undefined
quasi: TemplateLiteral
parent: Node

интерфейс Deno.lint.TemplateElement

нестабильный

Статическая часть шаблонного литерала.

Свойства

type: "TemplateElement"
range: Range
tail: boolean
raw: string
cooked: string
parent: TemplateLiteral | TSTemplateLiteralType

интерфейс Deno.lint.TemplateLiteral

нестабильный

Строка-шаблонный литерал.

Свойства

type: "TemplateLiteral"
range: Range
quasis: TemplateElement[]
expressions: Expression[]
parent: Node

интерфейс Deno.lint.ThisExpression

нестабильный

Ключевое слово this, используемое в классах.

Свойства

type: "ThisExpression"
range: Range
parent: Node

интерфейс Deno.lint.ThrowStatement

нестабильный

Выбрасывает исключение, определённое пользователем. Останавливает выполнение текущей функции.

Свойства

type: "ThrowStatement"
range: Range
argument: Expression
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.TryStatement

нестабильный

Инструкция try/catch

Свойства

type: "TryStatement"
range: Range
block: BlockStatement
handler: CatchClause | null
finalizer: BlockStatement | null
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.TSAbstractMethodDefinition

нестабильный

Свойства

type: "TSAbstractMethodDefinition"
range: Range
computed: boolean
optional: boolean
override: boolean
static: boolean
accessibility: Accessibility | undefined
kind: "method"
key:
Expression
| Identifier
| NumberLiteral
| StringLiteral
value: FunctionExpression | TSEmptyBodyFunctionExpression
parent: Node

интерфейс Deno.lint.TSAbstractPropertyDefinition

нестабильный

Свойства

type: "TSAbstractPropertyDefinition"
range: Range
computed: boolean
optional: boolean
override: boolean
static: boolean
definite: boolean
declare: boolean
readonly: boolean
accessibility: Accessibility | undefined
decorators: Decorator[]
key:
Expression
| PrivateIdentifier
| Identifier
| NumberLiteral
| StringLiteral
typeAnnotation: TSTypeAnnotation | undefined
value: Expression | null
parent: ClassBody

интерфейс Deno.lint.TSAnyKeyword

нестабильный
const a: any = null;

Свойства

type: "TSAnyKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSArrayType

нестабильный

Свойства

type: "TSArrayType"
range: Range
elementType: TypeNode
parent: Node

интерфейс Deno.lint.TSAsExpression

нестабильный

Свойства

type: "TSAsExpression"
range: Range
expression: Expression
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSBigIntKeyword

нестабильный

Свойства

type: "TSBigIntKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSBooleanKeyword

нестабильный

Свойства

type: "TSBooleanKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSCallSignatureDeclaration

нестабильный

Свойства

type: "TSCallSignatureDeclaration"
range: Range
typeParameters: TSTypeParameterDeclaration | undefined
params: Parameter[]
returnType: TSTypeAnnotation | undefined
parent: TSInterfaceBody | TSTypeLiteral

интерфейс Deno.lint.TSClassImplements

нестабильный

Свойства

type: "TSClassImplements"
range: Range
expression: Expression
typeArguments: TSTypeParameterInstantiation | undefined
parent: ClassDeclaration | ClassExpression

интерфейс Deno.lint.TSConditionalType

нестабильный

Свойства

type: "TSConditionalType"
range: Range
checkType: TypeNode
extendsType: TypeNode
trueType: TypeNode
falseType: TypeNode
parent: Node

интерфейс Deno.lint.TSConstructSignatureDeclaration

нестабильный

Свойства

type: "TSConstructSignatureDeclaration"
range: Range
typeParameters: TSTypeParameterDeclaration | undefined
params: Parameter[]
returnType: TSTypeAnnotation
parent: TSInterfaceBody | TSTypeLiteral

интерфейс Deno.lint.TSDeclareFunction

нестабильный

Свойства

type: "TSDeclareFunction"
range: Range
async: boolean
declare: boolean
generator: boolean
body: undefined
id: Identifier | null
params: Parameter[]
returnType: TSTypeAnnotation | undefined
typeParameters: TSTypeParameterDeclaration | undefined
parent: Node

интерфейс Deno.lint.TSEmptyBodyFunctionExpression

нестабильный

Свойства

type: "TSEmptyBodyFunctionExpression"
range: Range
declare: boolean
expression: boolean
async: boolean
generator: boolean
id: null
body: null
typeParameters: TSTypeParameterDeclaration | undefined
params: Parameter[]
returnType: TSTypeAnnotation | undefined
parent:
MethodDefinition
| Property
| TSAbstractMethodDefinition
| TSParameterProperty

интерфейс Deno.lint.TSEnumBody

нестабильный

Тело TSEnumDeclaration

Свойства

type: "TSEnumBody"
range: Range
members: TSEnumMember[]
parent: TSEnumDeclaration

интерфейс Deno.lint.TSEnumDeclaration

нестабильный
enum Foo { A, B };

Свойства

type: "TSEnumDeclaration"
range: Range
declare: boolean
const: boolean
id: Identifier
body: TSEnumBody
parent: Node

интерфейс Deno.lint.TSEnumMember

нестабильный

Элемент TSEnumDeclaration

Свойства

type: "TSEnumMember"
range: Range
id:
Identifier
| NumberLiteral
| StringLiteral
initializer: Expression | undefined
parent: TSEnumBody

интерфейс Deno.lint.TSExportAssignment

нестабильный

Свойства

type: "TSExportAssignment"
range: Range
expression: Expression
parent: Node

интерфейс Deno.lint.TSExternalModuleReference

нестабильный

Свойства

type: "TSExternalModuleReference"
range: Range
expression: StringLiteral
parent: Node

интерфейс Deno.lint.TSFunctionType

нестабильный

Свойства

type: "TSFunctionType"
range: Range
params: Parameter[]
returnType: TSTypeAnnotation | undefined
typeParameters: TSTypeParameterDeclaration | undefined
parent: Node

интерфейс Deno.lint.TSImportEqualsDeclaration

нестабильный

Свойства

type: "TSImportEqualsDeclaration"
range: Range
importKind: "type" | "value"
id: Identifier
moduleReference:
Identifier
| TSExternalModuleReference
| TSQualifiedName
parent: Node

интерфейс Deno.lint.TSImportType

нестабильный

Свойства

type: "TSImportType"
range: Range
argument: TypeNode
qualifier:
Identifier
| ThisExpression
| TSQualifiedName
| null
typeArguments: TSTypeParameterInstantiation | null
parent: Node

интерфейс Deno.lint.TSIndexedAccessType

нестабильный

Свойства

type: "TSIndexedAccessType"
range: Range
indexType: TypeNode
objectType: TypeNode
parent: Node

интерфейс Deno.lint.TSIndexSignature

нестабильный

Свойства

type: "TSIndexSignature"
range: Range
readonly: boolean
static: boolean
parameters: Parameter[]
typeAnnotation: TSTypeAnnotation | undefined
parent:
ClassBody
| TSInterfaceBody
| TSTypeLiteral

интерфейс Deno.lint.TSInferType

нестабильный

Свойства

type: "TSInferType"
range: Range
typeParameter: TSTypeParameter
parent: Node

интерфейс Deno.lint.TSInstantiationExpression

нестабильный

Свойства

type: "TSInstantiationExpression"
range: Range
expression: Expression
typeArguments: TSTypeParameterInstantiation
parent: Node

интерфейс Deno.lint.TSInterfaceBody

нестабильный

Свойства

type: "TSInterfaceBody"
range: Range
body: Array<
TSCallSignatureDeclaration
| TSConstructSignatureDeclaration
| TSIndexSignature
| TSMethodSignature
| TSPropertySignature
>
parent: TSInterfaceDeclaration

интерфейс Deno.lint.TSInterfaceDeclaration

нестабильный

Свойства

type: "TSInterfaceDeclaration"
range: Range
declare: boolean
id: Identifier
extends: TSInterfaceHeritage[]
typeParameters: TSTypeParameterDeclaration | undefined
body: TSInterfaceBody
parent: Node

интерфейс Deno.lint.TSInterfaceHeritage

нестабильный

Свойства

type: "TSInterfaceHeritage"
range: Range
expression: Expression
typeArguments: TSTypeParameterInstantiation | undefined
parent: TSInterfaceBody

интерфейс Deno.lint.TSIntersectionType

нестабильный

Свойства

type: "TSIntersectionType"
range: Range
types: TypeNode[]
parent: Node

интерфейс Deno.lint.TSIntrinsicKeyword

нестабильный

Свойства

type: "TSIntrinsicKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSLiteralType

нестабильный

Свойства

type: "TSLiteralType"
range: Range
literal:
Literal
| TemplateLiteral
| UnaryExpression
| UpdateExpression
parent: Node

интерфейс Deno.lint.TSMappedType

нестабильный

Свойства

type: "TSMappedType"
range: Range
readonly: boolean
optional: boolean
nameType: TypeNode | null
typeAnnotation: TypeNode | undefined
constraint: TypeNode
key: Identifier
parent: Node

интерфейс Deno.lint.TSMethodSignature

нестабильный

Свойства

type: "TSMethodSignature"
range: Range
computed: boolean
optional: boolean
readonly: boolean
static: boolean
kind:
"get"
| "set"
| "method"
key:
Expression
| Identifier
| NumberLiteral
| StringLiteral
returnType: TSTypeAnnotation | undefined
params: Parameter[]
typeParameters: TSTypeParameterDeclaration | undefined
parent: TSInterfaceBody | TSTypeLiteral

интерфейс Deno.lint.TSModuleBlock

нестабильный

Тело TSModuleDeclaration

Свойства

type: "TSModuleBlock"
range: Range
body: Array<
ExportAllDeclaration
| ExportDefaultDeclaration
| ExportNamedDeclaration
| ImportDeclaration
| Statement
| TSImportEqualsDeclaration
| TSNamespaceExportDeclaration
>
parent: TSModuleDeclaration

интерфейс Deno.lint.TSModuleDeclaration

нестабильный

Свойства

type: "TSModuleDeclaration"
range: Range
declare: boolean
kind:
"global"
| "module"
| "namespace"
id:
Identifier
| Literal
| TSQualifiedName
body: TSModuleBlock | undefined
parent:
ExportDefaultDeclaration
| ExportNamedDeclaration
| Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.TSNamedTupleMember

нестабильный

Свойства

type: "TSNamedTupleMember"
range: Range
label: Identifier
elementType: TypeNode
optional: boolean
parent: Node

интерфейс Deno.lint.TSNamespaceExportDeclaration

нестабильный

Свойства

type: "TSNamespaceExportDeclaration"
range: Range
id: Identifier
parent: Node

интерфейс Deno.lint.TSNeverKeyword

нестабильный

Свойства

type: "TSNeverKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSNonNullExpression

нестабильный

Свойства

type: "TSNonNullExpression"
range: Range
expression: Expression
parent: Node

интерфейс Deno.lint.TSNullKeyword

нестабильный

Свойства

type: "TSNullKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSNumberKeyword

нестабильный

Свойства

type: "TSNumberKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSObjectKeyword

нестабильный

Свойства

type: "TSObjectKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSOptionalType

нестабильный

Свойства

type: "TSOptionalType"
range: Range
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSParameterProperty

нестабильный

Свойства

type: "TSParameterProperty"
range: Range
override: boolean
readonly: boolean
static: boolean
accessibility: Accessibility | undefined
decorators: Decorator[]
parameter:
AssignmentPattern
| ArrayPattern
| ObjectPattern
| Identifier
| RestElement
parent:
ArrowFunctionExpression
| FunctionDeclaration
| FunctionExpression
| TSDeclareFunction
| TSEmptyBodyFunctionExpression

интерфейс Deno.lint.TSPropertySignature

нестабильный

Свойства

type: "TSPropertySignature"
range: Range
computed: boolean
optional: boolean
readonly: boolean
static: boolean
key:
PrivateIdentifier
| Expression
| Identifier
| NumberLiteral
| StringLiteral
typeAnnotation: TSTypeAnnotation | undefined
parent: TSInterfaceBody | TSTypeLiteral

интерфейс Deno.lint.TSQualifiedName

нестабильный

Свойства

type: "TSQualifiedName"
range: Range
left:
Identifier
| ThisExpression
| TSQualifiedName
right: Identifier
parent: Node

интерфейс Deno.lint.TSRestType

нестабильный

Свойства

type: "TSRestType"
range: Range
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSSatisfiesExpression

нестабильный

Свойства

type: "TSSatisfiesExpression"
range: Range
expression: Expression
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSStringKeyword

нестабильный

Свойства

type: "TSStringKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSSymbolKeyword

нестабильный

Свойства

type: "TSSymbolKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSTemplateLiteralType

нестабильный

Свойства

type: "TSTemplateLiteralType"
range: Range
quasis: TemplateElement[]
types: TypeNode[]
parent: Node

интерфейс Deno.lint.TSThisType

нестабильный

Свойства

type: "TSThisType"
range: Range
parent: Node

интерфейс Deno.lint.TSTupleType

нестабильный

Свойства

type: "TSTupleType"
range: Range
elementTypes: TypeNode[]
parent: Node

интерфейс Deno.lint.TSTypeAliasDeclaration

нестабильный

Свойства

type: "TSTypeAliasDeclaration"
range: Range
declare: boolean
id: Identifier
typeParameters: TSTypeParameterDeclaration | undefined
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSTypeAnnotation

нестабильный

Свойства

type: "TSTypeAnnotation"
range: Range
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSTypeAssertion

нестабильный

Свойства

type: "TSTypeAssertion"
range: Range
expression: Expression
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSTypeLiteral

нестабильный

Свойства

type: "TSTypeLiteral"
range: Range
members: Array<
TSCallSignatureDeclaration
| TSConstructSignatureDeclaration
| TSIndexSignature
| TSMethodSignature
| TSPropertySignature
>
parent: Node

интерфейс Deno.lint.TSTypeOperator

нестабильный

Свойства

type: "TSTypeOperator"
range: Range
operator:
"keyof"
| "readonly"
| "unique"
typeAnnotation: TypeNode
parent: Node

интерфейс Deno.lint.TSTypeParameter

нестабильный

Свойства

type: "TSTypeParameter"
range: Range
in: boolean
out: boolean
const: boolean
name: Identifier
constraint: TypeNode | null
default: TypeNode | null
parent:
TSInferType
| TSMappedType
| TSTypeParameterDeclaration

интерфейс Deno.lint.TSTypeParameterDeclaration

нестабильный

Свойства

type: "TSTypeParameterDeclaration"
range: Range
params: TSTypeParameter[]
parent: Node

интерфейс Deno.lint.TSTypeParameterInstantiation

нестабильный

Свойства

type: "TSTypeParameterInstantiation"
range: Range
params: TypeNode[]
parent:
ClassExpression
| NewExpression
| CallExpression
| TaggedTemplateExpression
| JSXOpeningElement
| TSClassImplements
| TSInstantiationExpression
| TSInterfaceHeritage
| TSTypeQuery
| TSTypeReference
| TSImportType

интерфейс Deno.lint.TSTypePredicate

нестабильный

Свойства

type: "TSTypePredicate"
range: Range
asserts: boolean
parameterName: Identifier | TSThisType
typeAnnotation: TSTypeAnnotation | undefined
parent: Node

интерфейс Deno.lint.TSTypeQuery

нестабильный

Свойства

type: "TSTypeQuery"
range: Range
exprName:
Identifier
| ThisExpression
| TSQualifiedName
| TSImportType
typeArguments: TSTypeParameterInstantiation | undefined
parent: Node

интерфейс Deno.lint.TSTypeReference

нестабильный

Свойства

type: "TSTypeReference"
range: Range
typeName:
Identifier
| ThisExpression
| TSQualifiedName
typeArguments: TSTypeParameterInstantiation | undefined
parent: Node

интерфейс Deno.lint.TSUndefinedKeyword

нестабильный

Свойства

type: "TSUndefinedKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSUnionType

нестабильный

Свойства

type: "TSUnionType"
range: Range
types: TypeNode[]
parent: Node

интерфейс Deno.lint.TSUnknownKeyword

нестабильный

Свойства

type: "TSUnknownKeyword"
range: Range
parent: Node

интерфейс Deno.lint.TSVoidKeyword

нестабильный

Свойства

type: "TSVoidKeyword"
range: Range
parent: Node

интерфейс Deno.lint.UnaryExpression

нестабильный

Применяет операнд к значению на основе указанного оператора.

Свойства

type: "UnaryExpression"
range: Range
operator:
"!"
| "+"
| "~"
| "-"
| "delete"
| "typeof"
| "void"
argument: Expression
parent: Node

интерфейс Deno.lint.UpdateExpression

нестабильный

Синтаксический сахар для увеличения или уменьшения значения.

Свойства

type: "UpdateExpression"
range: Range
prefix: boolean
operator: "++" | "--"
argument: Expression
parent: Node

интерфейс Deno.lint.VariableDeclaration

нестабильный

Объявление переменной.

Свойства

type: "VariableDeclaration"
range: Range
declare: boolean
kind:
"let"
| "var"
| "const"
| "await using"
| "using"
declarations: VariableDeclarator[]
parent: Node

интерфейс Deno.lint.VariableDeclarator

нестабильный

Объявление переменных может объявлять несколько переменных. Этот узел представляет одно отдельное объявление.

Свойства

type: "VariableDeclarator"
range: Range
id:
ArrayPattern
| ObjectPattern
| Identifier
init: Expression | null
definite: boolean
parent: VariableDeclaration

интерфейс Deno.lint.WhileStatement

нестабильный

Выполняет цикл, пока проверочное выражение истинно.

Свойства

type: "WhileStatement"
range: Range
test: Expression
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

интерфейс Deno.lint.YieldExpression

нестабильный

Приостанавливает или возобновляет выполнение функции-генератора.

Свойства

type: "YieldExpression"
range: Range
delegate: boolean
argument: Expression | null
parent: Node

интерфейс Deno.lint.WithStatement

нестабильный

Устаревшая возможность JavaScript, использование которой сегодня не рекомендуется.

Свойства

type: "WithStatement"
range: Range
object: Expression
body: Statement
parent:
Program
| StaticBlock
| BlockStatement
| WithStatement
| LabeledStatement
| IfStatement
| SwitchCase
| WhileStatement
| DoWhileStatement
| ForStatement
| ForInStatement
| ForOfStatement
| TSModuleBlock

пространство имён Deno.lint

нестабильный

Функции

Deno.lint.runPlugin

Этот API полезен для тестирования плагинов линтера.

Интерфейсы

Deno.lint.AccessorProperty
Документация отсутствует
  • accessibility
  • computed
  • declare
  • decorators
  • key
  • optional
  • override
  • parent
  • range
  • readonly
  • static
  • type
  • value
Deno.lint.ArrayExpression

Литерал массива

  • elements
  • parent
  • range
  • type
Deno.lint.ArrayPattern

Деструктуризация массива.

  • elements
  • optional
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.ArrowFunctionExpression

Выражение стрелочной функции

  • async
  • body
  • generator
  • id
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.AssignmentExpression

Обновление значения переменной или свойства.

  • left
  • operator
  • parent
  • range
  • right
  • type
Deno.lint.AssignmentPattern

Присваивание значений по умолчанию параметрам.

  • left
  • parent
  • range
  • right
  • type
Deno.lint.AwaitExpression

Ожидание результата Promise и получение его выполненного значения.

  • argument
  • parent
  • range
  • type
Deno.lint.BigIntLiteral

Представляет числа, слишком большие или слишком маленькие для представления типом number.

  • bigint
  • parent
  • range
  • raw
  • type
  • value
Deno.lint.BinaryExpression

Сравнение левого и правого значений с помощью указанного оператора.

  • left
  • operator
  • parent
  • range
  • right
  • type
Deno.lint.BlockComment

Потенциально многострочный блочный комментарий

  • range
  • type
  • value
Deno.lint.BlockStatement
Документация отсутствует
  • body
  • parent
  • range
  • type
Deno.lint.BooleanLiteral

Либо true, либо false

  • parent
  • range
  • raw
  • type
  • value
Deno.lint.BreakStatement

Прерывает любой цикл или именованную инструкцию, например:

  • label
  • parent
  • range
  • type
Deno.lint.CallExpression

Вызов функции.

  • arguments
  • callee
  • optional
  • parent
  • range
  • type
  • typeArguments
Deno.lint.CatchClause

Блок catch инструкции try/catch

  • body
  • param
  • parent
  • range
  • type
Deno.lint.ChainExpression

Выражение цепочки

  • expression
  • parent
  • range
  • type
Deno.lint.ClassBody

Представляет тело класса и содержит все его члены

  • body
  • parent
  • range
  • type
Deno.lint.ClassDeclaration

Объявляет класс в текущей области видимости

  • abstract
  • body
  • declare
  • id
  • implements
  • parent
  • range
  • superClass
  • type
Deno.lint.ClassExpression

Похоже на ClassDeclaration, но используется для объявления класса как выражения. Основное отличие состоит в том, что имя класса (=id) можно опустить.

  • abstract
  • body
  • declare
  • id
  • implements
  • parent
  • range
  • superClass
  • superTypeArguments
  • type
  • typeParameters
Deno.lint.ConditionalExpression

Встроенная инструкция if.

  • alternate
  • consequent
  • parent
  • range
  • test
  • type
Deno.lint.ContinueStatement

Завершает текущую итерацию цикла и переходит к следующей.

  • label
  • parent
  • range
  • type
Deno.lint.DebuggerStatement

Инструкция debugger;.

  • parent
  • range
  • type
Deno.lint.Decorator

Экспериментальная возможность: декораторы

  • expression
  • parent
  • range
  • type
Deno.lint.Diagnostic
Документация отсутствует
  • fix
  • hint
  • id
  • message
  • range
Deno.lint.DoWhileStatement

Повторяет цикл, пока проверочное выражение истинно.

  • body
  • parent
  • range
  • test
  • type
Deno.lint.ExportAllDeclaration
Документация отсутствует
  • attributes
  • exportKind
  • exported
  • parent
  • range
  • source
  • type
Deno.lint.ExportDefaultDeclaration
Документация отсутствует
  • declaration
  • exportKind
  • parent
  • range
  • type
Deno.lint.ExportNamedDeclaration
Документация отсутствует
  • attributes
  • declaration
  • exportKind
  • parent
  • range
  • source
  • specifiers
  • type
Deno.lint.ExportSpecifier
Документация отсутствует
  • exportKind
  • exported
  • local
  • parent
  • range
  • type
Deno.lint.ExpressionStatement

Инструкция, содержащая выражение.

  • expression
  • parent
  • range
  • type
Deno.lint.Fix
Документация отсутствует
  • range
  • text
Deno.lint.Fixer
Документация отсутствует
  • insertTextAfter
  • insertTextAfterRange
  • insertTextBefore
  • insertTextBeforeRange
  • remove
  • removeRange
  • replaceText
  • replaceTextRange
Deno.lint.ForInStatement

Перебирает все перечисляемые строковые свойства объекта.

  • body
  • left
  • parent
  • range
  • right
  • type
Deno.lint.ForOfStatement

Перебор последовательности значений итератора.

  • await
  • body
  • left
  • parent
  • range
  • right
  • type
Deno.lint.ForStatement

Классический цикл for.

  • body
  • init
  • parent
  • range
  • test
  • type
  • update
Deno.lint.FunctionDeclaration

Объявляет функцию в текущей области видимости

  • async
  • body
  • declare
  • generator
  • id
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.FunctionExpression

Объявляет функцию в виде выражения. Похоже на FunctionDeclaration, но с необязательным именем (=id).

  • async
  • body
  • generator
  • id
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.Identifier

Пользовательский именованный узел, заданный разработчиком. Может быть именем переменной, функции, параметра и т. д.

  • name
  • optional
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.IfStatement

Выполняет оператор, если условие истинно; в противном случае выполняет альтернативный оператор, если он задан.

  • alternate
  • consequent
  • parent
  • range
  • test
  • type
Deno.lint.ImportAttribute
Документация отсутствует
  • key
  • parent
  • range
  • type
  • value
Deno.lint.ImportDeclaration

Объявление импорта, примеры:

  • attributes
  • importKind
  • parent
  • range
  • source
  • specifiers
  • type
Deno.lint.ImportDefaultSpecifier
Документация отсутствует
  • local
  • parent
  • range
  • type
Deno.lint.ImportExpression

Динамически импортирует модуль.

  • options
  • parent
  • range
  • source
  • type
Deno.lint.ImportNamespaceSpecifier
Документация отсутствует
  • local
  • parent
  • range
  • type
Deno.lint.ImportSpecifier
Документация отсутствует
  • importKind
  • imported
  • local
  • parent
  • range
  • type
Deno.lint.JSXAttribute

Атрибут JSX

  • name
  • parent
  • range
  • type
  • value
Deno.lint.JSXClosingElement

Закрывающий тег JSXElement. Используется только для элементов, у которых нет самозакрывающегося тега.

  • name
  • parent
  • range
  • type
Deno.lint.JSXClosingFragment

Закрывающий тег JSXFragment.

  • parent
  • range
  • type
Deno.lint.JSXElement

Элемент JSX.

  • children
  • closingElement
  • openingElement
  • parent
  • range
  • type
Deno.lint.JSXEmptyExpression

Пустое выражение JSX.

  • parent
  • range
  • type
Deno.lint.JSXExpressionContainer

Вставляет обычное выражение JS в JSX.

  • expression
  • parent
  • range
  • type
Deno.lint.JSXFragment

Обычно это промежуточный узел для нескольких соседних элементов, поскольку синтаксис JSX требует наличия одного корневого элемента.

  • children
  • closingFragment
  • openingFragment
  • parent
  • range
  • type
Deno.lint.JSXIdentifier

Пользовательский идентификатор внутри JSX.

  • name
  • parent
  • range
  • type
Deno.lint.JSXMemberExpression

Выражение доступа к члену JSX.

  • object
  • parent
  • property
  • range
  • type
Deno.lint.JSXNamespacedName

Имя с пространством имён в JSX

  • name
  • namespace
  • parent
  • range
  • type
Deno.lint.JSXOpeningElement

Открывающий тег JSXElement

  • attributes
  • name
  • parent
  • range
  • selfClosing
  • type
  • typeArguments
Deno.lint.JSXOpeningFragment

Открывающий тег JSXFragment.

  • parent
  • range
  • type
Deno.lint.JSXSpreadAttribute

Раскрывает объект в виде атрибутов JSX.

  • argument
  • parent
  • range
  • type
Deno.lint.JSXText

Обычный текст в JSX.

  • parent
  • range
  • raw
  • type
  • value
Deno.lint.LabeledStatement

Пользовательское управление потоком выполнения на основе меток.

  • body
  • label
  • parent
  • range
  • type
Deno.lint.LineComment

Однострочный комментарий

  • range
  • type
  • value
Deno.lint.LogicalExpression

Объединяет выражения в цепочку с помощью указанного оператора

  • left
  • operator
  • parent
  • range
  • right
  • type
Deno.lint.MemberExpression

MemberExpression

  • computed
  • object
  • optional
  • parent
  • property
  • range
  • type
Deno.lint.MetaProperty

Может быть либо import.meta, либо new.target.

  • meta
  • parent
  • property
  • range
  • type
Deno.lint.MethodDefinition
Документация отсутствует
  • accessibility
  • computed
  • declare
  • decorators
  • key
  • kind
  • optional
  • override
  • parent
  • range
  • readonly
  • static
  • type
  • value
Deno.lint.NewExpression

Создаёт новый экземпляр класса.

  • arguments
  • callee
  • parent
  • range
  • type
  • typeArguments
Deno.lint.NullLiteral

Литерал null

  • parent
  • range
  • raw
  • type
  • value
Deno.lint.NumberLiteral

Числовой литерал

  • parent
  • range
  • raw
  • type
  • value
Deno.lint.ObjectExpression

Литерал объекта.

  • parent
  • properties
  • range
  • type
Deno.lint.ObjectPattern

Деструктуризация объекта.

  • optional
  • parent
  • properties
  • range
  • type
  • typeAnnotation
Deno.lint.Plugin

В файле плагина сделайте, например, следующее

  • name
  • rules
Deno.lint.PrivateIdentifier

Имена приватных членов классов должны начинаться с #.

  • name
  • parent
  • range
  • type
Deno.lint.Program
Документация отсутствует
  • body
  • comments
  • range
  • sourceType
  • type
Deno.lint.Property
Документация отсутствует
  • computed
  • key
  • kind
  • method
  • parent
  • range
  • shorthand
  • type
  • value
Deno.lint.PropertyDefinition
Документация отсутствует
  • accessibility
  • computed
  • declare
  • decorators
  • key
  • optional
  • override
  • parent
  • range
  • readonly
  • static
  • type
  • typeAnnotation
  • value
Deno.lint.RegExpLiteral

Литерал регулярного выражения:

  • parent
  • range
  • raw
  • regex
  • type
  • value
Deno.lint.ReportData
Документация отсутствует
  • fix
  • hint
  • message
  • node
  • range
Deno.lint.RestElement

Остальные параметры функции.

  • argument
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.ReturnStatement

Возвращает значение из функции.

  • argument
  • parent
  • range
  • type
Deno.lint.Rule
Документация отсутствует
  • create
  • destroy
Deno.lint.RuleContext
Документация отсутствует
  • filename
  • getFilename
  • getSourceCode
  • id
  • report
  • sourceCode
Deno.lint.SequenceExpression

Последовательное выполнение нескольких выражений.

  • expressions
  • parent
  • range
  • type
Deno.lint.SourceCode
Документация отсутствует
  • ast
  • getAllComments
  • getAncestors
  • getCommentsAfter
  • getCommentsBefore
  • getCommentsInside
  • getText
  • text
Deno.lint.SpreadElement
Документация отсутствует
  • argument
  • parent
  • range
  • type
Deno.lint.StaticBlock

Блок статической инициализации класса.

  • body
  • parent
  • range
  • type
Deno.lint.StringLiteral

Строковый литерал

  • parent
  • range
  • raw
  • type
  • value
Deno.lint.Super

Ключевое слово super, используемое в классах.

  • parent
  • range
  • type
Deno.lint.SwitchCase

Один вариант оператора SwitchStatement.

  • consequent
  • parent
  • range
  • test
  • type
Deno.lint.SwitchStatement

Сопоставление выражения с набором вариантов.

  • cases
  • discriminant
  • parent
  • range
  • type
Deno.lint.TaggedTemplateExpression

Тегированный шаблонный литерал.

  • parent
  • quasi
  • range
  • tag
  • type
  • typeArguments
Deno.lint.TemplateElement

Статическая часть шаблонного литерала.

  • cooked
  • parent
  • range
  • raw
  • tail
  • type
Deno.lint.TemplateLiteral

Строковый шаблонный литерал.

  • expressions
  • parent
  • quasis
  • range
  • type
Deno.lint.ThisExpression

Ключевое слово this, используемое в классах.

  • parent
  • range
  • type
Deno.lint.ThrowStatement

Выбрасывает исключение, определяемое пользователем. Прекращает выполнение текущей функции.

  • argument
  • parent
  • range
  • type
Deno.lint.TryStatement

Оператор try/catch

  • block
  • finalizer
  • handler
  • parent
  • range
  • type
Deno.lint.TSAbstractMethodDefinition
Документация отсутствует
  • accessibility
  • computed
  • key
  • kind
  • optional
  • override
  • parent
  • range
  • static
  • type
  • value
Deno.lint.TSAbstractPropertyDefinition
Документация отсутствует
  • accessibility
  • computed
  • declare
  • decorators
  • definite
  • key
  • optional
  • override
  • parent
  • range
  • readonly
  • static
  • type
  • typeAnnotation
  • value
Deno.lint.TSAnyKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSArrayType
Документация отсутствует
  • elementType
  • parent
  • range
  • type
Deno.lint.TSAsExpression
Документация отсутствует
  • expression
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSBigIntKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSBooleanKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSCallSignatureDeclaration
Документация отсутствует
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.TSClassImplements
Документация отсутствует
  • expression
  • parent
  • range
  • type
  • typeArguments
Deno.lint.TSConditionalType
Документация отсутствует
  • checkType
  • extendsType
  • falseType
  • parent
  • range
  • trueType
  • type
Deno.lint.TSConstructSignatureDeclaration
Документация отсутствует
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.TSDeclareFunction
Документация отсутствует
  • async
  • body
  • declare
  • generator
  • id
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.TSEmptyBodyFunctionExpression
Документация отсутствует
  • async
  • body
  • declare
  • expression
  • generator
  • id
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.TSEnumBody

Тело TSEnumDeclaration

  • members
  • parent
  • range
  • type
Deno.lint.TSEnumDeclaration
Документация отсутствует
  • body
  • const
  • declare
  • id
  • parent
  • range
  • type
Deno.lint.TSEnumMember

Элемент TSEnumDeclaration

  • id
  • initializer
  • parent
  • range
  • type
Deno.lint.TSExportAssignment
Документация отсутствует
  • expression
  • parent
  • range
  • type
Deno.lint.TSExternalModuleReference
Документация отсутствует
  • expression
  • parent
  • range
  • type
Deno.lint.TSFunctionType
Документация отсутствует
  • params
  • parent
  • range
  • returnType
  • type
  • typeParameters
Deno.lint.TSImportEqualsDeclaration
Документация отсутствует
  • id
  • importKind
  • moduleReference
  • parent
  • range
  • type
Deno.lint.TSImportType
Документация отсутствует
  • argument
  • parent
  • qualifier
  • range
  • type
  • typeArguments
Deno.lint.TSIndexedAccessType
Документация отсутствует
  • indexType
  • objectType
  • parent
  • range
  • type
Deno.lint.TSIndexSignature
Документация отсутствует
  • parameters
  • parent
  • range
  • readonly
  • static
  • type
  • typeAnnotation
Deno.lint.TSInferType
Документация отсутствует
  • parent
  • range
  • type
  • typeParameter
Deno.lint.TSInstantiationExpression
Документация отсутствует
  • expression
  • parent
  • range
  • type
  • typeArguments
Deno.lint.TSInterfaceBody
Документация отсутствует
  • body
  • parent
  • range
  • type
Deno.lint.TSInterfaceDeclaration
Документация отсутствует
  • body
  • declare
  • extends
  • id
  • parent
  • range
  • type
  • typeParameters
Deno.lint.TSInterfaceHeritage
Документация отсутствует
  • expression
  • parent
  • range
  • type
  • typeArguments
Deno.lint.TSIntersectionType
Документация отсутствует
  • parent
  • range
  • type
  • types
Deno.lint.TSIntrinsicKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSLiteralType
Документация отсутствует
  • literal
  • parent
  • range
  • type
Deno.lint.TSMappedType
Документация отсутствует
  • constraint
  • key
  • nameType
  • optional
  • parent
  • range
  • readonly
  • type
  • typeAnnotation
Deno.lint.TSMethodSignature
Документация отсутствует
  • computed
  • key
  • kind
  • optional
  • params
  • parent
  • range
  • readonly
  • returnType
  • static
  • type
  • typeParameters
Deno.lint.TSModuleBlock

Тело TSModuleDeclaration

  • body
  • parent
  • range
  • type
Deno.lint.TSModuleDeclaration
Документация отсутствует
  • body
  • declare
  • id
  • kind
  • parent
  • range
  • type
Deno.lint.TSNamedTupleMember
Документация отсутствует
  • elementType
  • label
  • optional
  • parent
  • range
  • type
Deno.lint.TSNamespaceExportDeclaration
Документация отсутствует
  • id
  • parent
  • range
  • type
Deno.lint.TSNeverKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSNonNullExpression
Документация отсутствует
  • expression
  • parent
  • range
  • type
Deno.lint.TSNullKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSNumberKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSObjectKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSOptionalType
Документация отсутствует
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSParameterProperty
Документация отсутствует
  • accessibility
  • decorators
  • override
  • parameter
  • parent
  • range
  • readonly
  • static
  • type
Deno.lint.TSPropertySignature
Документация отсутствует
  • computed
  • key
  • optional
  • parent
  • range
  • readonly
  • static
  • type
  • typeAnnotation
Deno.lint.TSQualifiedName
Документация отсутствует
  • left
  • parent
  • range
  • right
  • type
Deno.lint.TSRestType
Документация отсутствует
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSSatisfiesExpression
Документация отсутствует
  • expression
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSStringKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSSymbolKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSTemplateLiteralType
Документация отсутствует
  • parent
  • quasis
  • range
  • type
  • types
Deno.lint.TSThisType
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSTupleType
Документация отсутствует
  • elementTypes
  • parent
  • range
  • type
Deno.lint.TSTypeAliasDeclaration
Документация отсутствует
  • declare
  • id
  • parent
  • range
  • type
  • typeAnnotation
  • typeParameters
Deno.lint.TSTypeAnnotation
Документация отсутствует
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSTypeAssertion
Документация отсутствует
  • expression
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSTypeLiteral
Документация отсутствует
  • members
  • parent
  • range
  • type
Deno.lint.TSTypeOperator
Документация отсутствует
  • operator
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSTypeParameter
Документация отсутствует
  • const
  • constraint
  • default
  • in
  • name
  • out
  • parent
  • range
  • type
Deno.lint.TSTypeParameterDeclaration
Документация отсутствует
  • params
  • parent
  • range
  • type
Deno.lint.TSTypeParameterInstantiation
Документация отсутствует
  • params
  • parent
  • range
  • type
Deno.lint.TSTypePredicate
Документация отсутствует
  • asserts
  • parameterName
  • parent
  • range
  • type
  • typeAnnotation
Deno.lint.TSTypeQuery
Документация отсутствует
  • exprName
  • parent
  • range
  • type
  • typeArguments
Deno.lint.TSTypeReference
Документация отсутствует
  • parent
  • range
  • type
  • typeArguments
  • typeName
Deno.lint.TSUndefinedKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSUnionType
Документация отсутствует
  • parent
  • range
  • type
  • types
Deno.lint.TSUnknownKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.TSVoidKeyword
Документация отсутствует
  • parent
  • range
  • type
Deno.lint.UnaryExpression

Применение операнда к значению на основе указанного оператора.

  • argument
  • operator
  • parent
  • range
  • type
Deno.lint.UpdateExpression

Синтаксический сахар для увеличения или уменьшения значения.

  • argument
  • operator
  • parent
  • prefix
  • range
  • type
Deno.lint.VariableDeclaration

Объявление переменной.

  • declarations
  • declare
  • kind
  • parent
  • range
  • type
Deno.lint.VariableDeclarator

В одном VariableDeclaration можно объявить несколько переменных. Этот узел представляет одно такое объявление.

  • definite
  • id
  • init
  • parent
  • range
  • type
Deno.lint.WhileStatement

Выполняет цикл, пока проверочное выражение истинно.

  • body
  • parent
  • range
  • test
  • type
Deno.lint.YieldExpression

Приостанавливает или возобновляет выполнение функции-генератора.

  • argument
  • delegate
  • parent
  • range
  • type
Deno.lint.WithStatement

Устаревшая возможность JavaScript, использование которой сегодня не рекомендуется.

  • body
  • object
  • parent
  • range
  • type

Псевдонимы типов

Deno.lint.Accessibility

Модификаторы доступа TypeScript, используемые в классах

Deno.lint.Expression

Объединённый тип всех возможных узлов выражений

Deno.lint.JSXChild

Объединённый тип всех возможных дочерних узлов в JSX

Deno.lint.LintVisitor
Документация отсутствует
Deno.lint.Literal

Объединённый тип всех литералов

Deno.lint.Node

Объединённый тип всех возможных узлов AST

Deno.lint.Parameter

Параметр функции/метода

Deno.lint.Range
Документация отсутствует
Deno.lint.Statement

Объединённый тип всех возможных узлов инструкций

Deno.lint.TypeNode

Объединённый тип всех возможных узлов типов в TypeScript


псевдоним типа Deno.lint.Accessibility

нестабильный

Модификаторы доступа TypeScript, используемые в классах

Определение

"private"
| "protected"
| "public"

псевдоним типа Deno.lint.Expression

нестабильный

Объединение всех возможных узлов выражений

Определение

ArrayExpression
| ArrayPattern
| ArrowFunctionExpression
| AssignmentExpression
| AwaitExpression
| BinaryExpression
| CallExpression
| ChainExpression
| ClassExpression
| ConditionalExpression
| FunctionExpression
| Identifier
| ImportExpression
| JSXElement
| JSXFragment
| Literal
| TemplateLiteral
| LogicalExpression
| MemberExpression
| MetaProperty
| NewExpression
| ObjectExpression
| ObjectPattern
| SequenceExpression
| Super
| TaggedTemplateExpression
| TemplateLiteral
| ThisExpression
| TSAsExpression
| TSInstantiationExpression
| TSNonNullExpression
| TSSatisfiesExpression
| TSTypeAssertion
| UnaryExpression
| UpdateExpression
| YieldExpression

псевдоним типа Deno.lint.JSXChild

нестабильный

Объединение всех возможных дочерних узлов JSX

Определение

JSXElement
| JSXExpressionContainer
| JSXFragment
| JSXText

псевдоним типа Deno.lint.LintVisitor

нестабильный

Определение

[P in Node["type"]]?: (node: Extract<Node, { type: P; }>) => void
& [P in Node["type"] in keyof `${P}:exit`]?: (node: Extract<Node, { type: P; }>) => void
& Partial<{ [key: string]: (node: any) => void; }>

псевдоним типа Deno.lint.Literal

нестабильный

Объединение всех литералов

Определение

BigIntLiteral
| BooleanLiteral
| NullLiteral
| NumberLiteral
| RegExpLiteral
| StringLiteral

псевдоним типа Deno.lint.Node

нестабильный

Объединение всех возможных узлов AST

Определение

Program
| Expression
| Statement
| TypeNode
| ImportSpecifier
| ImportDefaultSpecifier
| ImportNamespaceSpecifier
| ImportAttribute
| TSExternalModuleReference
| ExportSpecifier
| VariableDeclarator
| Decorator
| ClassBody
| StaticBlock
| PropertyDefinition
| MethodDefinition
| SwitchCase
| CatchClause
| TemplateElement
| PrivateIdentifier
| AssignmentPattern
| RestElement
| SpreadElement
| Property
| JSXIdentifier
| JSXNamespacedName
| JSXEmptyExpression
| JSXOpeningElement
| JSXAttribute
| JSXSpreadAttribute
| JSXClosingElement
| JSXOpeningFragment
| JSXClosingFragment
| JSXExpressionContainer
| JSXText
| JSXMemberExpression
| TSModuleBlock
| TSClassImplements
| TSAbstractMethodDefinition
| TSAbstractPropertyDefinition
| TSEmptyBodyFunctionExpression
| TSCallSignatureDeclaration
| TSPropertySignature
| TSEnumBody
| TSEnumMember
| TSTypeParameterInstantiation
| TSInterfaceBody
| TSConstructSignatureDeclaration
| TSMethodSignature
| TSInterfaceHeritage
| TSIndexSignature
| TSTypeAnnotation
| TSTypeParameterDeclaration
| TSTypeParameter
| LineComment
| BlockComment

псевдоним типа Deno.lint.Parameter

нестабильный

Параметр функции/метода

Определение

ArrayPattern
| AssignmentPattern
| Identifier
| ObjectPattern
| RestElement
| TSParameterProperty

псевдоним типа Deno.lint.Range

нестабильный

Определение

[number, number]

псевдоним типа Deno.lint.Statement

нестабильный

Объединение всех возможных узлов операторов

Определение

BlockStatement
| BreakStatement
| ClassDeclaration
| ContinueStatement
| DebuggerStatement
| DoWhileStatement
| ExportAllDeclaration
| ExportDefaultDeclaration
| ExportNamedDeclaration
| ExpressionStatement
| ForInStatement
| ForOfStatement
| ForStatement
| FunctionDeclaration
| IfStatement
| ImportDeclaration
| LabeledStatement
| ReturnStatement
| SwitchStatement
| ThrowStatement
| TryStatement
| TSDeclareFunction
| TSEnumDeclaration
| TSExportAssignment
| TSImportEqualsDeclaration
| TSInterfaceDeclaration
| TSModuleDeclaration
| TSNamespaceExportDeclaration
| TSTypeAliasDeclaration
| VariableDeclaration
| WhileStatement
| WithStatement

псевдоним типа Deno.lint.TypeNode

нестабильный

Объединение всех возможных узлов типов в TypeScript

Определение

TSAnyKeyword
| TSArrayType
| TSBigIntKeyword
| TSBooleanKeyword
| TSConditionalType
| TSFunctionType
| TSImportType
| TSIndexedAccessType
| TSInferType
| TSIntersectionType
| TSIntrinsicKeyword
| TSLiteralType
| TSMappedType
| TSNamedTupleMember
| TSNeverKeyword
| TSNullKeyword
| TSNumberKeyword
| TSObjectKeyword
| TSOptionalType
| TSQualifiedName
| TSRestType
| TSStringKeyword
| TSSymbolKeyword
| TSTemplateLiteralType
| TSThisType
| TSTupleType
| TSTypeLiteral
| TSTypeOperator
| TSTypePredicate
| TSTypeQuery
| TSTypeReference
| TSUndefinedKeyword
| TSUnionType
| TSUnknownKeyword
| TSVoidKeyword

© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/api/deno/linter

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API