npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@femessage/types

v1.0.3

Published

FEMessage basic Typescript type declaration files

Downloads

18

Readme

types

Build Status NPM Download NPM Version NPM License PRs Welcome Automated Release Notes by gren

FEMessage basic Typescript type declaration files

中文文档

Table of Contents

Introduction

It is mainly used to store the TypeScript type declaration of the underlying dependency package of the FEMessage component library, so that users of the FEMessage component library can use the type declaration normally regardless of which Fork version of the underlying dependency is installed.

Existing Dependency Library type declarations:

  • Element
  • We'll add others as needed...

The type declaration file of this repository is copied from the official package without any modification.

Install

yarn add -D @femessage/types

⬆ Back to Top

Usage

import { Table,Form } from '@femessage/types/element-ui'

FAQ

What problem was solved?

Add to FEMessage Component Library .d.ts This problem was found during the File: because some components need to rely on the type declaration exported by the Element, FEMessage depends on the official Element, however, it is possible that the user of the FEMessage component library is using another Fork Element (e.g. @femessage/element-ui), which will cause some FEMessage type declarations to fail.

the solution is to copy the type declaration file of the Element to this repository. FEMessage component libraries depend on the type exported by the Element, so use the type file here.

This means that the type declaration of the FEMessage component will not be affected regardless of whether the FEMessage user installs the official Element or the Fork Element.

Actually, it's just Element as an example. In fact, the UI libraries on which the FEMessage component library depends have this problem, such.

If the underlying dependency library API is inconsistent with the official API?

However, if the Element installed by FEMessage users is a major change, it will affect API , what should I do?

For example, let's say the user has installed a Fork Element that has made API changes to the el-table component. The FEMessage component that relies on this repository cannot be used properly because the API has become inconsistent, which also causes the type declarations to not match.

If this happens, the solution steps:

  1. Copy the .d.ts file from the FEMessage component to the project locally.
  2. Replace @femessage/types in the local .d.ts file with the Element path used by the project.
- import { Table,Form } from '@femessage/types/element-ui'
+ import { Table,Form } from 'element-ui' // node_modules

Which FEMessage components are using it?

The following components are currently in use.

  • el-data-table
  • el-data-tree
  • el-form-renderer

Note: This list may not be updated in time. The actual situation depends on the component's package.json

⬆ Back to Top

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

⬆ Back to Top

License

MIT

⬆ Back to Top