From 9856b138df1066c720d1dfef8739dad8ee7a4975 Mon Sep 17 00:00:00 2001 From: rhpidfyre Date: Wed, 5 Mar 2025 02:58:02 -0500 Subject: [PATCH] type fix --- src/rt/rfwfs/collection.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/rt/rfwfs/collection.ts b/src/rt/rfwfs/collection.ts index 1f986ea..7477352 100644 --- a/src/rt/rfwfs/collection.ts +++ b/src/rt/rfwfs/collection.ts @@ -4,13 +4,13 @@ import entry_search from "./index" type Files = Entry[] -interface EntryCollectionManipulate { - pop: >(file_name: string) => Entry | undefined, - get: >(file_name: string) => Entry | undefined - push: >(entry: Entry) => boolean, +interface EntryCollectionManipulate> { + pop: (file_name: string) => Entry | undefined, + get: (file_name: string) => Entry | undefined + push: (entry: Entry) => boolean, sort: () => void, } -interface EntryCollection extends EntryCollectionManipulate { +interface EntryCollection> extends EntryCollectionManipulate { readonly inner: Files } @@ -18,7 +18,7 @@ function sort>(self: EntryCollection) { self.inner.sort((a,z) => a.name.localeCompare(z.name)) } -function push, T extends Entry>(self: EntryCollection, entry: Entry) { +function push>(self: EntryCollection, entry: Entry) { const no_duplicates = entry_search(self.inner, entry.name) if (!no_duplicates) { self.push(entry)