New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

generated-module

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

generated-module

Generate types or/and runtime JS dynamically on some package install

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Generated Module

Important notes on default tsconfig:

  • always latest target
  • strict mode, but with implicit any allowed

Generating should always happen via some TypeScript builder and not via strings manipulations as Prisma do (use ts-morph or TS factory)

With this module you can use two types of builders:

  • ts-morph (recommended)
  • (WIP) TypeScript factory e.g. ts.factory methods (native)

The last one is most known and used, you can find a lot of examples with it on GitHub. And you can use https://ts-ast-viewer.com/:

  • write code that should be generated

  • select all

  • copy and adjust code from left-bottom window (Factory Code)

  • When using linking for testing or in workspace: Keep in mind this limitation

Usage Example

see ./example-time dir

  • TODO link action-inputs

  • But note, that in real world generating module should happen via postinstall hook

More Examples

TIME example

FAQs

Package last updated on 24 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc