Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cosmiconfig-typescript-loader

Package Overview
Dependencies
Maintainers
0
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosmiconfig-typescript-loader

TypeScript loader for cosmiconfig

  • 6.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.7M
increased by8.14%
Maintainers
0
Weekly downloads
 
Created

What is cosmiconfig-typescript-loader?

The cosmiconfig-typescript-loader package is designed to enable the loading of TypeScript files by cosmiconfig, a library used for finding and loading configuration files for Node.js projects. This loader allows cosmiconfig to read and parse configurations written in TypeScript, providing a seamless integration for projects that prefer TypeScript for configuration.

What are cosmiconfig-typescript-loader's main functionalities?

Loading TypeScript configuration files

This feature allows cosmiconfig to load and parse TypeScript files as configuration files. The code sample demonstrates how to configure cosmiconfig to use the cosmiconfig-typescript-loader for '.ts' files, enabling the loading of TypeScript configurations.

const { cosmiconfig } = require('cosmiconfig');
const { cosmiconfigTypescriptLoader } = require('cosmiconfig-typescript-loader');

const explorer = cosmiconfig('yourModuleName', {
  searchPlaces: ['config.ts', 'otherConfig.ts'],
  loaders: {
    '.ts': cosmiconfigTypescriptLoader
  }
});

explorer.search().then((result) => {
  console.log(result.config);
});

Other packages similar to cosmiconfig-typescript-loader

Keywords

FAQs

Package last updated on 19 Oct 2024

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