+
Skip to content
This repository was archived by the owner on Dec 12, 2023. It is now read-only.
This repository was archived by the owner on Dec 12, 2023. It is now read-only.

removing the need of typings/registry/global #165

Open
@unional

Description

@unional

I'm doing this locally and it seems to work well:

// get a package with module typings
npm i my-module-with-typing
typing i npm~some-module
// custom-typings/my-module-with-typing.d.ts
export * from 'my-module-with-typings'
export as namespace MyModuleWithTypings

// custom-typings/some-module
export * from 'some-module'
export as namespace SomeModule

Maybe typings can create those custom typings files directly?
In this case, we can reduce the registry by half.

Of course, one issue is how to determine the module's namespace.
How will DT do it for @types?

Lately, I'm working on globalify and released my own @unional/globalify which I can define my own global namespace variable.
It can help but still need to deal with libraries that already release global umd build with special namespace variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载