remove tests
This commit is contained in:
parent
dc25645f1f
commit
7ae5214358
1 changed files with 7 additions and 11 deletions
|
@ -278,13 +278,7 @@ Object.entries;
|
||||||
type Progressive<T> =
|
type Progressive<T> =
|
||||||
T extends Array<any>
|
T extends Array<any>
|
||||||
? ArrayProgressive<T extends Array<infer X> ? X : never, T>
|
? ArrayProgressive<T extends Array<infer X> ? X : never, T>
|
||||||
: T extends string
|
: T extends string | boolean | null | number
|
||||||
? T
|
|
||||||
: T extends boolean
|
|
||||||
? T
|
|
||||||
: T extends null
|
|
||||||
? T
|
|
||||||
: T extends number
|
|
||||||
? T
|
? T
|
||||||
: T extends Object
|
: T extends Object
|
||||||
? ObjectProgressive<T>
|
? ObjectProgressive<T>
|
||||||
|
@ -300,10 +294,12 @@ export async function ProgessiveDecodeJSON<X>(
|
||||||
await prog.ready;
|
await prog.ready;
|
||||||
return identifyType(prog) as Promise<Progressive<X>>;
|
return identifyType(prog) as Promise<Progressive<X>>;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
const test = [1, 2, 3, 4, 5, 6];
|
const test = [1, 2, 3, 4, 5, 6];
|
||||||
const blob = new Blob([JSON.stringify(test)]);
|
const blob = new Blob([JSON.stringify(test)]);
|
||||||
ProgessiveDecodeJSON<typeof test>(blob)
|
ProgessiveDecodeJSON<typeof test>("https://api.github.com/repos/spacebarchat/server/git/refs")
|
||||||
.then(async (obj) => {
|
.then(async (obj) => {
|
||||||
console.log(await obj.getWhole()); //returns the ping object
|
console.log(await obj.getWhole()); //returns the ping object
|
||||||
})
|
})
|
||||||
.then(console.warn);
|
.then(console.warn);
|
||||||
|
//*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue