Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stoplight/types

Package Overview
Dependencies
Maintainers
10
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stoplight/types - npm Package Compare versions

Comparing version 3.1.0 to 4.0.0

diagnostics.d.ts

2

index.d.ts

@@ -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;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc