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

typescript.api

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typescript.api - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

package.json
{
"name": "typescript.api",
"version": "0.2.1",
"version": "0.2.2",
"description": "A compiler as a service api enabling nodejs developers to resolve, compile, reflect and run typescript 0.9 source files.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -137,3 +137,4 @@ declare module TypeScript.Api.Units {

public ast: AST;
constructor(path: string, content: string, diagnostics: Diagnostic[], ast: AST);
public declaration: string;
constructor(path: string, content: string, diagnostics: Diagnostic[], ast: AST, declaration: string);
}

@@ -140,0 +141,0 @@ }

@@ -539,5 +539,6 @@ var TypeScript;

__extends(CompiledUnit, _super);
function CompiledUnit(path, content, diagnostics, ast) {
function CompiledUnit(path, content, diagnostics, ast, declaration) {
_super.call(this, path, content, diagnostics);
this.ast = ast;
this.declaration = declaration;
}

@@ -593,2 +594,3 @@ return CompiledUnit;

settings.disallowBool = true;
settings.generateDeclarationFiles = true;
this.compiler = new TypeScript.TypeScriptCompiler(new TypeScript.Api.Loggers.NullLogger(), settings, TypeScript.diagnosticMessages);

@@ -674,2 +676,3 @@ this.compiler.logger = new TypeScript.Api.Loggers.NullLogger();

});
this.compiler.emitAllDeclarations();
var result = [];

@@ -686,7 +689,17 @@ for(var file in emitter.files) {

if (sourceUnit) {
var path = sourceUnit.path;
var path = sourceUnit.path.replace(/\\/g, '/');
var content = emitter.files[file].toString();
var diagnostics = sourceUnit.diagnostics;
var ast = document.script;
result.push(new TypeScript.Api.Units.CompiledUnit(path, content, diagnostics, ast));
var declaration = '';
for(var decl in emitter.files) {
if (decl.indexOf('.d.ts') != -1) {
var comparer = decl.replace(/\\/g, '/').replace('.d.ts', '.ts');
if (path == comparer) {
declaration = emitter.files[decl].toString();
break;
}
}
}
result.push(new TypeScript.Api.Units.CompiledUnit(path, content, diagnostics, ast, declaration));
}

@@ -693,0 +706,0 @@ }

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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