Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@types/coffeescript

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/coffeescript - npm Package Compare versions

Comparing version
2.5.0
to
2.5.1
+39
-167
coffeescript/index.d.ts
// Type definitions for CoffeeScript 2.5
// Project: https://github.com/jashkenas/coffeescript
// Definitions by: Munin M. <https://github.com/rogierschouten>
// Definitions by: Munin M. <https://github.com/SNDST00M>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/**
* Babel AST source location.
*/
interface BabelSourceLocation {
start: {
line: number;
column: number;
};
end: {
line: number;
column: number;
};
}
import * as Babel from "@babel/core";
/**
* Babel abstract syntax tree comment.
*/
interface BabelComment {
value: string;
start: number;
end: number;
loc: BabelSourceLocation;
}
/**
* Babel transpilation result for file.
*/
interface BabelFileResult {
ast?: {
type: string;
leadingComments?: BabelComment[];
innerComments?: BabelComment[];
trailingComments?: BabelComment[];
start: number;
end: number;
loc: BabelSourceLocation;
};
code?: string;
ignored?: boolean;
map?: object;
metadata?: {
usedHelpers: string[];
marked: Array<{ type: string; message: string; loc: object }>;
modules: {
imports: object[];
exports: {
exported: object[];
specifiers: object[];
};
};
};
}
interface BabelTransformOptions {
[k: string]: unknown;
/** Include the AST in the returned object. */
ast?: boolean;
/** Attach a comment after all non-user injected code. */
auxiliaryCommentAfter?: string;
/** Attach a comment before all non-user injected code. */
auxiliaryCommentBefore?: string;
/** Enable code generation */
code?: boolean;
/** Output comments in generated output. */
comments?: boolean;
/**
* Do not include superfluous whitespace characters and line terminators.
* When set to "auto" compact is set to true on input sizes of >500KB.
*/
compact?: "auto" | true | false;
/** A path to a .babelrc file to extend. */
extends?: string;
/** Filename for use in errors etc. */
filename?: string;
/** Filename relative to sourceRoot Defaults to "filename". */
filenameRelative?: string;
/** ANSI highlight syntax error code frames. */
highlightCode?: boolean;
/** Opposite of the "only" option. */
ignore?: string | string[];
/**
* If true, attempt to load an input sourcemap from the file itself.
* If an object is provided, it will be treated as the source map object itself.
*/
inputSourceMap?: boolean | { [k: string]: unknown };
/** Keep extensions in module ids */
keepModuleIdExtensions?: boolean;
/** Specify a custom name for module ids. */
moduleId?: string;
/**
* If truthy, insert an explicit id for modules. By default, all modules are
* anonymous. (Not available for common modules)
*/
moduleIds?: boolean & string;
/**
* Optional prefix for the AMD module formatter that will be prepend to the
* filename on module definitions. Defaults to "sourceRoot".
*/
moduleRoot?: string;
/**
* A glob, regex, or mixed array of both, matching paths to only compile. Can
* also be an array of arrays containing paths to explicitly match. When
* attempting to compile a non-matching file it's returned verbatim.
*/
only?: string | string[];
/** List of plugins to load and use */
plugins?: Array<string | string[] | [string, { [k: string]: unknown }]>;
/** List of presets (a set of plugins) to load and use */
presets?: Array<string | string[] | [string, { [k: string]: unknown }]>;
/**
* Retain line numbers. This will lead to wacky code but is handy for
* scenarios where you can't use source maps. NOTE: This will obviously not
* retain the columns.
*/
retainLines?: boolean;
/** Set sources[0] on returned source map. Defaults to "filenameRelative". */
sourceFileName?: string;
/**
* If truthy, adds a map property to returned output. If set to "inline", a
* comment with a sourceMappingURL directive is added to the bottom of the
* returned code. If set to "both" then a map property is returned as well
* as a source map comment appended.
*/
sourceMaps?: "both" | "inline" | true | false;
/** Set file on returned source map. Defaults to "filenameRelative". */
sourceMapTarget?: string;
/** The root from which all sources are relative. Defaults to "moduleRoot". */
sourceRoot?: string;
}
/**
* List of precompiled CoffeeScript file extensions.

@@ -440,6 +312,6 @@ */

* @param options.sourceMap If true, output a source map object with the code.
* @param options.transpile Babel transpilation options - see `babel.TransformOptions`.
* @param options.transpile Babel transpilation options - see `Babel.TransformOptions`.
* @returns Babel transpiler result for file.
*/
export function transpile(code: string, options?: Options): BabelFileResult;
export function transpile(code: string, options?: Options): Babel.BabelFileResult;

@@ -457,3 +329,3 @@ /**

* @param options.sourceMap If true, output a source map object with the code.
* @param options.transpile Babel transpilation options - see `babel.TransformOptions`.
* @param options.transpile Babel transpilation options - see `Babel.TransformOptions`.
* @returns Compiled and unevaluated JavaScript code if `options.sourceMap` is falsy and/or `undefined`.

@@ -479,3 +351,3 @@ * If `options.sourceMap` is `true`, this returns a `{js, v3SourceMap, sourceMap}` object, where `sourceMap` is a

* @param options.sourceMap If true, output a source map object with the code.
* @param options.transpile Babel transpilation options - see `babel.TransformOptions`.
* @param options.transpile Babel transpilation options - see `Babel.TransformOptions`.
* @returns Compiled and unevaluated JavaScript code.

@@ -497,3 +369,3 @@ */

* @param options.sourceMap If true, output a source map object with the code.
* @param options.transpile Babel transpilation options - see `babel.TransformOptions`.
* @param options.transpile Babel transpilation options - see `Babel.TransformOptions`.
* @returns Output of evaluated CoffeeScript code in the NodeJS environment.

@@ -515,3 +387,3 @@ */

* @param options.sourceMap If true, output a source map object with the code.
* @param options.transpile Babel transpilation options - see `babel.TransformOptions`.
* @param options.transpile Babel transpilation options - see `Babel.TransformOptions`.
* @returns Output of compiled CoffeeScript code.

@@ -590,31 +462,31 @@ */

export interface Options {
/**
* If true, output an abstract syntax tree of the input CoffeeScript source code.
*/
ast?: boolean;
/**
* If true, omit a top-level IIFE safety wrapper.
*/
bare?: boolean;
/**
* File name to compile - defaults to `index.js`.
*/
filename?: string;
/**
* If true, output the `Generated by CoffeeScript` header.
*/
header?: boolean;
/**
* If true, output the source map as a base64-encoded string in a comment at the bottom.
*/
inlineMap?: boolean;
/**
* If true, output a source map object with the code.
*/
sourceMap?: boolean;
/**
* Babel transpilation options - see `babel.TransformOptions`.
*/
transpile?: BabelTransformOptions;
}
/**
* If true, output an abstract syntax tree of the input CoffeeScript source code.
*/
ast?: boolean;
/**
* If true, omit a top-level IIFE safety wrapper.
*/
bare?: boolean;
/**
* File name to compile - defaults to `index.js`.
*/
filename?: string;
/**
* If true, output the `Generated by CoffeeScript` header.
*/
header?: boolean;
/**
* If true, output the source map as a base64-encoded string in a comment at the bottom.
*/
inlineMap?: boolean;
/**
* If true, output a source map object with the code.
*/
sourceMap?: boolean;
/**
* Babel transpilation options - see `Babel.TransformOptions`.
*/
transpile?: Babel.TransformOptions;
}

@@ -651,5 +523,5 @@ /**

/**
* Babel transpilation options - see `babel.TransformOptions`.
* Babel transpilation options - see `Babel.TransformOptions`.
*/
transpile?: BabelTransformOptions;
transpile?: Babel.TransformOptions;
}

@@ -656,0 +528,0 @@

+8
-6
{
"name": "@types/coffeescript",
"version": "2.5.0",
"version": "2.5.1",
"description": "TypeScript definitions for CoffeeScript",

@@ -10,4 +10,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/coffeescript",

"name": "Munin M.",
"url": "https://github.com/rogierschouten",
"githubUsername": "rogierschouten"
"url": "https://github.com/SNDST00M",
"githubUsername": "SNDST00M"
}

@@ -23,5 +23,7 @@ ],

"scripts": {},
"dependencies": {},
"typesPublisherContentHash": "78ce156b217315629ce9980b722881da3f15b273a1f81a08ca000a6f79d98c80",
"typeScriptVersion": "3.6"
"dependencies": {
"@babel/core": "^7.1.15"
},
"typesPublisherContentHash": "148035e226fcac64391d8fc1528fe242286d89f5b742ae52959a136a1718d34b",
"typeScriptVersion": "3.7"
}

@@ -11,7 +11,7 @@ # Installation

### Additional Details
* Last updated: Tue, 03 Aug 2021 21:01:24 GMT
* Dependencies: none
* Last updated: Tue, 14 Sep 2021 13:01:31 GMT
* Dependencies: [@types/babel__core](https://npmjs.com/package/@types/babel__core)
* Global values: none
# Credits
These definitions were written by [Munin M.](https://github.com/rogierschouten).
These definitions were written by [Munin M.](https://github.com/SNDST00M).