@stoplight/types
Advanced tools
Comparing version 3.1.0 to 4.0.0
@@ -9,2 +9,2 @@ export * from './basic'; | ||
export * from './servers'; | ||
export * from './validations'; | ||
export * from './diagnostics'; |
@@ -6,3 +6,3 @@ "use strict"; | ||
tslib_1.__exportStar(require("./logs"), exports); | ||
tslib_1.__exportStar(require("./validations"), exports); | ||
tslib_1.__exportStar(require("./diagnostics"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@stoplight/types", | ||
"version": "3.1.0", | ||
"version": "4.0.0", | ||
"description": "Common typings for the Stoplight ecosystem.", | ||
@@ -5,0 +5,0 @@ "keywords": [], |
@@ -1,18 +0,30 @@ | ||
import { Dictionary } from './basic'; | ||
import { IValidationResult } from './validations'; | ||
export declare type SourceMapParser<T = any> = (value: string) => IParserResult<T>; | ||
export declare type ObjPath = Array<string | number>; | ||
import { IDiagnostic } from './diagnostics'; | ||
export declare type SourceMapParser<T = unknown, A extends object = object, L = unknown> = (value: string) => IParserResult<T, A, L>; | ||
export declare type DocumentUri = string; | ||
export declare type Segment = string | number; | ||
export declare type JsonPath = Segment[]; | ||
export interface IParserResult<T = any, A extends object = object, L = unknown> extends IParserASTResult<T, A, L> { | ||
diagnostics: IDiagnostic[]; | ||
} | ||
export interface IParserASTResult<T = unknown, A extends object = object, L = unknown> { | ||
data: T; | ||
ast: A; | ||
lineMap: L; | ||
} | ||
export declare type GetJsonPathForPosition<A extends object, L = unknown> = (result: IParserASTResult<unknown, A, L>, position: IPosition) => JsonPath | undefined; | ||
export declare type GetLocationForJsonPath<A extends object, L = unknown> = (result: IParserASTResult<unknown, A, L>, path: JsonPath) => ILocation | undefined; | ||
export interface IPosition { | ||
line: number; | ||
column?: number; | ||
readonly line: number; | ||
readonly character: number; | ||
} | ||
export interface IPathPosition { | ||
start: IPosition; | ||
end?: IPosition; | ||
export interface IRange { | ||
readonly start: IPosition; | ||
readonly end: IPosition; | ||
} | ||
export declare type IParserResultPointers = Dictionary<IPathPosition, string>; | ||
export interface IParserResult<T = any> { | ||
data: T; | ||
pointers: IParserResultPointers; | ||
validations: IValidationResult[]; | ||
export interface ILocation { | ||
uri?: DocumentUri; | ||
range: IRange; | ||
} | ||
export interface IJsonLocation extends ILocation { | ||
path: JsonPath; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24998
333