Add more type of argument for position

It can take both Position and Point
This commit is contained in:
Junyoung Choi
2017-09-06 21:54:08 +09:00
parent 7eb5ba8714
commit 08c0fcffbd

View File

@@ -40,11 +40,11 @@ declare namespace vfile {
fatal?: boolean | null;
}
type Message = (reason: string, position?: Position, ruleId?: string) => VFileError;
type Message = (reason: string, position?: Point | Position, ruleId?: string) => VFileError;
type Fail = (reason?: string, position?: Position, ruleId?: string) => void;
type Fail = (reason?: string, position?: Point | Position, ruleId?: string) => void;
type Info = (reason?: string, position?: Position, ruleId?: string) => void;
type Info = (reason?: string, position?: Point | Position, ruleId?: string) => void;
type ToString = (encoding?: BufferEncoding) => string;