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

ts-runtime

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-runtime - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

18

bin/index.js

@@ -16,2 +16,3 @@ #!/usr/bin/env node

let compilerOptions = '{}';
let tsConfigPath;
function defaultAction() {

@@ -23,3 +24,10 @@ const files = commander.args

}
const opts = ts.convertCompilerOptionsFromJson(JSON.parse(compilerOptions), '.');
compilerOptions = JSON.parse(compilerOptions);
if (tsConfigPath && ts.sys.fileExists(tsConfigPath)) {
const tsConfig = require(path.resolve(tsConfigPath));
if (tsConfig.hasOwnProperty('compilerOptions')) {
compilerOptions = tsConfig.compilerOptions;
}
}
const opts = ts.convertCompilerOptionsFromJson(compilerOptions, '.');
options.log = false;

@@ -34,2 +42,5 @@ options.compilerOptions = opts.options;

}
function useTsConfig(path) {
tsConfigPath = path;
}
function setNoAnnotate() {

@@ -75,3 +86,3 @@ options.noAnnotate = true;

}
function setTempFolder(name) {
function setTempFolderName(name) {
options.tempFolderName = name;

@@ -91,2 +102,3 @@ }

.option('-c, --compilerOptions <compilerOptions>', 'set TypeScript compiler options. defaults to "{}"', setCompilerOptions)
.option('-C, --tsConfig <path>', 'use the compiler options of the given tsconfig.json', useTsConfig)
.option('-d, --declarationFileName <fileName>', 'set file name for global declarations. defaults to "tsr-declarations"', setDeclarationFileName)

@@ -102,3 +114,3 @@ .option('-e, --excludeDeclarationFile', 'do not automatically import ambient declarations in the entry file. default to false', setExcludeDeclarationFile)

.option('-s, --stackTraceOutput <limit>', 'output a specified number of lines of the stack trace. defaults to 3', setStackTraceOutput)
.option('-t, --tempFolder <name>', 'set folder name for temporary files. defaults to ".tsr"', setTempFolder)
.option('-t, --tempFolderName <name>', 'set folder name for temporary files. defaults to ".tsr"', setTempFolderName)
.on('--help', () => {

@@ -105,0 +117,0 @@ console.log(' Examples:');

2

factory.js

@@ -901,3 +901,3 @@ "use strict";

nostrict(reflection) {
return this.strictNullChecks ? reflection : this.libCall('nostrict', reflection);
return this.strictNullChecks ? reflection : this.libCall('nullable', reflection);
}

@@ -904,0 +904,0 @@ intersect(args) {

{
"name": "ts-runtime",
"version": "0.1.4",
"version": "0.1.5",
"description": "Runtime type checks for TypeScript",

@@ -27,3 +27,3 @@ "main": "index.js",

"find-up": "^2.1.0",
"flow-runtime": "^0.12.0",
"flow-runtime": "^0.13.0",
"ora": "^1.2.0",

@@ -30,0 +30,0 @@ "pretty-time": "^0.2.0",

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