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

@typeonly/loader

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@typeonly/loader - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

1

dist/loader.d.ts

@@ -177,2 +177,3 @@ // -- API Definitions --

type: Type
optional: boolean
}

@@ -179,0 +180,0 @@

5

dist/loader/ModuleFactory.js

@@ -185,6 +185,7 @@ "use strict";

createFunctionParameters(rtoNodes) {
return rtoNodes.map(({ name, type }) => {
return rtoNodes.map(({ name, type, optional }) => {
return {
name,
type: type ? this.createType(type) : makeAny()
type: type ? this.createType(type) : makeAny(),
optional: !!optional
};

@@ -191,0 +192,0 @@ });

{
"name": "@typeonly/loader",
"version": "0.5.1",
"version": "0.5.2",
"description": "Brings types and interfaces from TypeScript at runtime.",

@@ -18,10 +18,10 @@ "author": "Paroi",

"devDependencies": {
"@types/jest": "^25.2.3",
"@types/node": "^14.0.12",
"jest": "^26.0.1",
"@types/jest": "^26.0.9",
"@types/node": "^14.0.27",
"jest": "^26.4.0",
"rimraf": "^3.0.2",
"ts-jest": "^26.1.0",
"tslint": "^6.1.2",
"typeonly": "^0.3.3",
"typescript": "^3.9.5"
"ts-jest": "^26.2.0",
"tslint": "^6.1.3",
"typeonly": "^0.4.2",
"typescript": "^3.9.7"
},

@@ -28,0 +28,0 @@ "main": "dist/api.js",

@@ -215,6 +215,7 @@ import { RtoArrayType, RtoCompositeType, RtoFunctionParameter, RtoFunctionType, RtoGenericInstance, RtoGenericParameter, RtoGenericParameterName, RtoImportedTypeRef, RtoIndexSignature, RtoInterface, RtoKeyofType, RtoLiteralType, RtoLocalTypeRef, RtoMappedIndexSignature, RtoMemberType, RtoModule, RtoNamedType, RtoProperty, RtoTupleType, RtoType, RtoTypeName } from "typeonly"

private createFunctionParameters(rtoNodes: RtoFunctionParameter[]): FunctionParameter[] {
return rtoNodes.map(({ name, type }) => {
return rtoNodes.map(({ name, type, optional }) => {
return {
name,
type: type ? this.createType(type) : makeAny()
type: type ? this.createType(type) : makeAny(),
optional: !!optional
}

@@ -221,0 +222,0 @@ })

@@ -140,2 +140,3 @@ export interface Modules {

type: Type
optional: boolean
}

@@ -142,0 +143,0 @@

@@ -510,3 +510,3 @@ import { createStandaloneRtoModule, parseTypeOnly } from "typeonly"

const source = `
export type T1 = <A> (a: string) => number
export type T1 = <A> (a?: string) => number
`

@@ -539,2 +539,3 @@ const modules = await loadModules({

name: "a",
optional: true,
type: {

@@ -541,0 +542,0 @@ kind: "name",

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