From 798233d7a52097e8edcf48808b877fabc62d4e58 Mon Sep 17 00:00:00 2001 From: Junyoung Choi Date: Thu, 7 Sep 2017 02:12:27 +0900 Subject: [PATCH] Accept `Position` with extra properties Delete `Node` interface because we are needed to check the properties about position only. --- types/vfile/index.d.ts | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/types/vfile/index.d.ts b/types/vfile/index.d.ts index 0ffd8cfab3..06726ef138 100644 --- a/types/vfile/index.d.ts +++ b/types/vfile/index.d.ts @@ -18,12 +18,6 @@ declare namespace vfile { end: Point; } - interface Node { - type: string; - data?: {}; - position?: Position; - } - interface VFileParamsBase { data?: D; contents?: Contents; @@ -49,13 +43,11 @@ declare namespace vfile { fatal?: boolean | null; } - type StringifiablePosition = Point | Position | Node; + type Message =

(reason: string, position?: Point | P, ruleId?: string) => VFileError; - type Message = (reason: string, position?: StringifiablePosition, ruleId?: string) => VFileError; + type Fail =

(reason: string, position?: Point | P, ruleId?: string) => never; - type Fail = (reason?: string, position?: StringifiablePosition, ruleId?: string) => never; - - type Info = (reason?: string, position?: StringifiablePosition, ruleId?: string) => void; + type Info =

(reason: string, position?: Point | P, ruleId?: string) => void; type ToString = (encoding?: BufferEncoding) => string;