Skip to content

Wrong type for parameter envPath in @std/dotenv load #6620

Closed
@eikooc

Description

@eikooc

Describe the bug

The type for the parameter envPath in @std/dotenv load is currently a string, but it also accepts a URL which is actually the only way to make it load included files in a compiled deno application, so the type should be expanded to be string | URL

Steps to Reproduce

  1. import { load } from '@std/dotenv'
  2. call load({ envPath: URL('config', import.meta.url) })
  3. Get a type error

Expected behavior

Expected to be able co use a URL for the parameter envPath.

Environment

  • OS: NixOS
  • deno version: 2.2.11
  • std version: 0.225.3 (latest version)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions