mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-09-19 07:30:27 +00:00
Vendored
+3
@@ -4,6 +4,7 @@
|
||||
// Jun Lu <https://github.com/lujun2>
|
||||
// Hernan Rajchert <https://github.com/hrajchert>
|
||||
// Titus Wormer <https://github.com/wooorm>
|
||||
// Junyoung Choi <https://github.com/rokt33r>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.0
|
||||
|
||||
@@ -26,6 +27,8 @@ export interface Node {
|
||||
* Must not be present if a node is generated.
|
||||
*/
|
||||
position?: Position;
|
||||
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Vendored
+1
-5
@@ -9,10 +9,6 @@
|
||||
import * as Unist from 'unist';
|
||||
|
||||
declare namespace vfileMessage {
|
||||
interface AnyNode extends Unist.Node {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a virtual message.
|
||||
*/
|
||||
@@ -25,7 +21,7 @@ declare namespace vfileMessage {
|
||||
* @param position Place at which the message occurred in a file (`Node`, `Position`, or `Point`, optional).
|
||||
* @param origin Place in code the message originates from (`string`, optional).
|
||||
*/
|
||||
(reason: string | Error, position?: AnyNode | Unist.Position | Unist.Point, origin?: string): VFileMessage;
|
||||
(reason: string | Error, position?: Unist.Node | Unist.Position | Unist.Point, origin?: string): VFileMessage;
|
||||
/**
|
||||
* Category of message.
|
||||
*/
|
||||
|
||||
Vendored
+3
-3
@@ -98,7 +98,7 @@ declare namespace vfile {
|
||||
* @param position Place at which the message occurred in `vfile`.
|
||||
* @param ruleId Category of message.
|
||||
*/
|
||||
message: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => vfileMessage.VFileMessage;
|
||||
message: (reason: string, position?: Unist.Point | Unist.Position | Unist.Node, ruleId?: string) => vfileMessage.VFileMessage;
|
||||
/**
|
||||
* Associates a fatal message with the file, then immediately throws it.
|
||||
* Note: fatal errors mean a file is no longer processable.
|
||||
@@ -107,7 +107,7 @@ declare namespace vfile {
|
||||
* @param position Place at which the message occurred in `vfile`.
|
||||
* @param ruleId Category of message.
|
||||
*/
|
||||
fail: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => never;
|
||||
fail: (reason: string, position?: Unist.Point | Unist.Position | Unist.Node, ruleId?: string) => never;
|
||||
/**
|
||||
* Associates an informational message with the file, where `fatal` is set to `null`.
|
||||
* Calls `message()` internally.
|
||||
@@ -115,7 +115,7 @@ declare namespace vfile {
|
||||
* @param position Place at which the message occurred in `vfile`.
|
||||
* @param ruleId Category of message.
|
||||
*/
|
||||
info: (reason: string, position?: Unist.Point | Unist.Position | vfileMessage.AnyNode, ruleId?: string) => vfileMessage.VFileMessage;
|
||||
info: (reason: string, position?: Unist.Point | Unist.Position | Unist.Node, ruleId?: string) => vfileMessage.VFileMessage;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user