falso icon indicating copy to clipboard operation
falso copied to clipboard

Quick falso access from ide

Open czlowiek488 opened this issue 2 years ago • 3 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/ngneat/falso/blob/master/CONTRIBUTING.md#commit
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

When falso is typed in IDE in any file typescript recognize a variable from this package and import it automatically. When you start writing access path to variable function list of availabel functions is displayed.

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

All falso functions must be imported by its own name. If I want to use a falso function I need to know what is the name of it.

What is the new behavior?

All falso function may be imported in one falso variable. If I want to use a falso function I can pick one accessable from falso variable.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

This is a feature that increase developer experience. If you look at the alternative solution faker you will see that in original package https://www.npmjs.com/package/faker/v/5.5.3 did not include this feature but a fork of it https://www.npmjs.com/package/@faker-js/faker do.

image image

To do the workaround I created a file like below in my project. However to avoid garbage files I belive this feature should be included in this package.

// falso.ts
export * as falso from "@ngneat/falso";

czlowiek488 avatar May 20 '22 17:05 czlowiek488

It breaks tree shaking.

NetanelBasal avatar May 21 '22 19:05 NetanelBasal

@NetanelBasal Support for tree shaking restored :)

czlowiek488 avatar May 22 '22 21:05 czlowiek488

@NetanelBasal What about this?

czlowiek488 avatar Jul 01 '22 17:07 czlowiek488

@NetanelBasal you should close this PR

PumpedSardines avatar Dec 13 '22 14:12 PumpedSardines