8000 Deno does not get types · Issue #1354 · minio/minio-js · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Deno does not get types #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amirs18 opened this issue Nov 4, 2024 · 2 comments
Open

Deno does not get types #1354

amirs18 opened this issue Nov 4, 2024 · 2 comments

Comments

@amirs18
Copy link
amirs18 commented Nov 4, 2024

steps to reproduce:

  1. open a new deno project
  2. deno add npm:minio
  3. in main.ts
import {} from "minio"
@amirs18
Copy link
Author
amirs18 commented Nov 4, 2024

temporery fix

// @deno-types="minio/dist/esm/minio.d.mts"
import { Client } from "minio";

@AbdulrhmanGoni
Copy link
AbdulrhmanGoni commented May 5, 2025

Also you can simply import the types from minio/dist/esm/minio.d.mts file like the following 👇🏿

// Types only
import { Client as MinioClient } from "minio/dist/esm/minio.d.mts";
let minioClient: MinioClient;

And import the actual code from minio/dist/esm/minio.mjs file like the following 👇🏿

// The actual Minio Client class
import { Client as MinioClient } from "minio/dist/esm/minio.mjs";
const minioClient = new MinioClient({...})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0