T extends Entry<T> -> T type error fix

This commit is contained in:
2025-03-05 19:47:59 -05:00
parent 9856b138df
commit b7babb665e
3 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import { type Entry } from "./main"
import entry_search from "./index"
type Files<T> = Entry<T>[]
type Files<T extends Entry<T>> = Entry<T>[]
interface EntryCollectionManipulate<T extends Entry<T>> {
pop: (file_name: string) => Entry<T> | undefined,

View File

@ -1,11 +1,11 @@
import { type Entry } from "./main"
import { type Files } from "./collection"
interface Wrap<T extends Entry<T>> {
interface Wrap<T> {
readonly result: T,
readonly index: number
}
function wrap_result<T extends Entry<T>>(result: T, index: number): Wrap<T> {
function wrap_result<T>(result: T, index: number): Wrap<T> {
return { result: result, index: index }
}

View File

@ -11,7 +11,7 @@ const enum Permissions {
none
}
interface Entry<T> {
interface Entry<T extends Entry<T>> {
readonly name: string,
readonly type: EntryType,
readonly inner: T,