remove types
This commit is contained in:
parent
0517ce1930
commit
37b4f5d96a
|
@ -1,9 +1,9 @@
|
|||
import { PngChunksExtract, PngChunkText } from "../deps.ts";
|
||||
import { pngChunksExtract, pngChunkTextDecode } from "../deps.ts";
|
||||
|
||||
export function getPngInfo(pngData: Uint8Array): string | undefined {
|
||||
return PngChunksExtract.default(pngData)
|
||||
return pngChunksExtract(pngData)
|
||||
.filter((chunk) => chunk.name === "tEXt")
|
||||
.map((chunk) => PngChunkText.decode(chunk.data))
|
||||
.map((chunk) => pngChunkTextDecode(chunk.data))
|
||||
.find((textChunk) => textChunk.keyword === "parameters")
|
||||
?.text;
|
||||
}
|
||||
|
|
8
deps.ts
8
deps.ts
|
@ -13,8 +13,6 @@ export * as GrammyParseMode from "https://deno.land/x/grammy_parse_mode@1.7.1/mo
|
|||
export * as GrammyKvStorage from "https://deno.land/x/grammy_storages@v2.3.1/denokv/src/mod.ts";
|
||||
export * as GrammyStatelessQ from "https://deno.land/x/grammy_stateless_question_alpha@v3.0.3/mod.ts";
|
||||
export * as GrammyFiles from "https://deno.land/x/grammy_files@v1.0.4/mod.ts";
|
||||
export * as FileType from "npm:file-type@18.5.0";
|
||||
// @deno-types="./types/png-chunks-extract.d.ts"
|
||||
export * as PngChunksExtract from "npm:png-chunks-extract@1.0.0";
|
||||
// @deno-types="./types/png-chunk-text.d.ts"
|
||||
export * as PngChunkText from "npm:png-chunk-text@1.0.0";
|
||||
export * as FileType from "https://esm.sh/file-type@18.5.0";
|
||||
export { default as pngChunksExtract } from "https://esm.sh/png-chunks-extract@1.0.0";
|
||||
export { decode as pngChunkTextDecode } from "https://esm.sh/png-chunk-text@1.0.0";
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
export function decode(chunk: Uint8Array): { keyword: string; text: string };
|
||||
export function encode(keyword: string, text: string): Uint8Array;
|
|
@ -1 +0,0 @@
|
|||
export default function encode(chunks: Array<{ name: string; data: Uint8Array }>): Uint8Array;
|
|
@ -1 +0,0 @@
|
|||
export default function extract(data: Uint8Array): Array<{ name: string; data: Uint8Array }>;
|
Loading…
Reference in New Issue