Skip to content

Commit d150956

Browse files
committed
fix(schema): symbol path param mutation
1 parent b18d527 commit d150956

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sourcemod-dev/schema",
3-
"version": "0.1.7",
3+
"version": "0.1.8",
44
"main": "dist/index.js",
55
"types": "dist/index.d.ts",
66
"files": [

schema/src/classes/bundle.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export class Strand implements IStrand, Searchable {
8686
this.typedefs = Strand.mapFibers(strand.typedefs, TypeDefinition);
8787
}
8888

89-
public async search(needle: string, options: SearchOptions): Promise<SearchResult[]> {
89+
public async search(needle: string, options: Readonly<SearchOptions>): Promise<SearchResult[]> {
9090
const ret: Promise<SearchResult[]>[] = [];
9191

9292
const searchSymbolType = (member: Record<string, Searchable>) => {
@@ -108,8 +108,8 @@ export class Strand implements IStrand, Searchable {
108108
return (await Promise.all(ret)).flat().filter(e => e.score > 0.5);
109109
}
110110

111-
public getSymbolByPath(path: string[]): ClassSymbol {
112-
path = path.filter(e => {
111+
public getSymbolByPath(p: string[]): ClassSymbol {
112+
const path = p.filter(e => {
113113
// Ignore Enum entries, as it's not a dedicated symbol
114114
return e.includes('.') || [
115115
Identifier.EnumerationEntry,

0 commit comments

Comments
 (0)