T extends Entry<T>
-> T
type error fix
This commit is contained in:
@ -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,
|
||||
|
@ -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 }
|
||||
}
|
||||
|
||||
|
@ -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,
|
||||
|
Reference in New Issue
Block a user