Socket
Socket
Sign inDemoInstall

tsickle

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsickle - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

.vscode/launch.json

11

build/src/decorator-annotator.js

@@ -60,7 +60,8 @@ "use strict";

var typeRef = param.type;
// Type reference can be a bare name or a qualified name (foo.bar).
// There are also type arguments to worry about. We are making the
// big assumption that a type reference is the same name as a ctor
// for that type, and it's simplest to just use the source text.
paramCtor = typeRef.getText();
// Type reference can be a bare name or a qualified name (foo.bar),
// possibly followed by type arguments (<X, Y>).
// We are making the assumption that a type reference is the same
// name as a ctor for that type, and it's simplest to just use the
// source text. We use `typeName` to avoid emitting type parameters.
paramCtor = typeRef.typeName.getText();
break;

@@ -67,0 +68,0 @@ default:

{
"name": "tsickle",
"version": "0.1.0",
"version": "0.1.1",
"description": "Transpile TypeScript code to JavaScript with Closure annotations.",

@@ -5,0 +5,0 @@ "main": "build/src/tsickle.js",

@@ -57,7 +57,8 @@ import * as ts from 'typescript';

let typeRef = param.type as ts.TypeReferenceNode;
// Type reference can be a bare name or a qualified name (foo.bar).
// There are also type arguments to worry about. We are making the
// big assumption that a type reference is the same name as a ctor
// for that type, and it's simplest to just use the source text.
paramCtor = typeRef.getText();
// Type reference can be a bare name or a qualified name (foo.bar),
// possibly followed by type arguments (<X, Y>).
// We are making the assumption that a type reference is the same
// name as a ctor for that type, and it's simplest to just use the
// source text. We use `typeName` to avoid emitting type parameters.
paramCtor = typeRef.typeName.getText();
break;

@@ -64,0 +65,0 @@ default:

@@ -205,2 +205,17 @@ import * as ts from 'typescript';

});
it('strips generic type arguments', () => {
expect(translate(`
class Foo {
constructor(@Inject typed: Promise<string>) {
}
}`).output).to.equal(`
class Foo {
constructor( typed: Promise<string>) {
}
static ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [
{type: Promise, decorators: [{ type: Inject }, ]},
];
}`);
});
});

@@ -207,0 +222,0 @@

Sorry, the diff of this file is not supported yet

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