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

glslx

Package Overview
Dependencies
Maintainers
1
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glslx - npm Package Compare versions

Comparing version 0.2.11 to 0.2.12

178

glslx.d.ts

@@ -1,5 +0,5 @@

type CompileInput = string | { name: string, contents: string } | { name: string, contents: string }[];
type FileAccess = (filePath: string, relativeTo: string) => (null | string | { name: string, contents: string });
export type CompileInput = string | { name: string, contents: string } | { name: string, contents: string }[];
export type FileAccess = (filePath: string, relativeTo: string) => (null | string | { name: string, contents: string });
interface CompileArgs {
export interface CompileArgs {
format?: 'json' | 'js' | 'c++' | 'skew' | 'rust'; // Default: 'json'

@@ -13,12 +13,14 @@ renaming?: 'all' | 'internal-only' | 'none'; // Default: 'all'

export function compile(input: CompileInput, args?: CompileArgs): {
export interface CompileResult {
log: string;
output: string | null;
};
}
interface CompileArgsIDE {
export function compile(input: CompileInput, args?: CompileArgs): CompileResult;
export interface CompileArgsIDE {
fileAccess?: FileAccess; // For '#include'
}
interface LineColumn {
export interface LineColumn {
line: number;

@@ -28,3 +30,3 @@ column: number;

interface Range {
export interface Range {
source: string;

@@ -35,67 +37,107 @@ start: LineColumn;

export function compileIDE(input: CompileInput, args?: CompileArgsIDE): {
diagnostics: {
kind: 'error' | 'warning';
text: string;
range: Range | null;
}[];
export interface Diagnostic {
kind: 'error' | 'warning';
text: string;
range: Range | null;
}
tooltipQuery(message: {
id: any;
source: string;
line: number;
column: number;
ignoreDiagnostics: boolean;
}): {
type: 'tooltip-query';
id: any;
source: string;
tooltip: string;
range: Range;
symbol: string;
};
export interface TooltipRequest {
source: string;
line: number;
column: number;
ignoreDiagnostics: boolean;
}
definitionQuery(message: {
id: any;
source: string;
line: number;
column: number;
}): {
type: 'definition-query';
id: any;
source: string;
definition: Range;
range: Range;
symbol: string;
};
export interface TooltipResponse {
tooltip: string | null;
range: Range | null;
symbol: string | null;
documentation: string | null;
}
symbolsQuery(message: {
id: any;
source: string;
}): {
type: 'symbols-query';
id: any;
source: string;
symbols: {
name: string;
kind: 'variable' | 'function' | 'struct';
range: Range;
}[];
};
export interface DefinitionRequest {
source: string;
line: number;
column: number;
}
renameQuery(message: {
id: any;
source: string;
line: number;
column: number;
}): {
type: 'rename-query';
id: any;
source: string;
ranges: Range[];
symbol: string;
};
};
export interface DefinitionResponse {
definition: Range | null;
range: Range | null;
symbol: string | null;
}
interface FormatArgs {
export interface SymbolsRequest {
source: string;
}
export interface SymbolsResponse {
symbols: Symbol[] | null;
}
export interface Symbol {
name: string;
kind: 'variable' | 'function' | 'struct';
range: Range;
}
export interface RenameRequest {
source: string;
line: number;
column: number;
}
export interface RenameResponse {
ranges: Range[] | null;
symbol: string | null;
}
export interface CompletionRequest {
source: string;
line: number;
column: number;
}
export interface CompletionResponse {
completions: Completion[];
}
export interface Completion {
kind: 'variable' | 'function' | 'struct' | 'keyword';
name: string;
detail: string;
documentation: string;
}
export interface SignatureRequest {
source: string;
line: number;
column: number;
}
export interface SignatureResponse {
signatures: Signature[];
activeArgument: number;
activeSignature: number;
}
export interface Signature {
text: string;
arguments: string[];
documentation: string;
}
export interface CompileResultIDE {
diagnostics: Diagnostic[];
tooltipQuery(message: TooltipRequest): TooltipResponse;
definitionQuery(message: DefinitionRequest): DefinitionResponse;
symbolsQuery(message: SymbolsRequest): SymbolsResponse;
renameQuery(message: RenameRequest): RenameResponse;
completionQuery(message: CompletionRequest): CompletionResponse;
signatureQuery(message: SignatureRequest): SignatureResponse;
}
export function compileIDE(input: CompileInput, args?: CompileArgsIDE): CompileResultIDE;
export interface FormatArgs {
indent?: string; // Default: ' '

@@ -102,0 +144,0 @@ newline?: string; // Default: '\n'

{
"name": "glslx",
"version": "0.2.11",
"version": "0.2.12",
"description": "",

@@ -5,0 +5,0 @@ "repository": "https://github.com/evanw/glslx",

Sorry, the diff of this file is not supported yet

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