# @types/sloc

> TypeScript definitions for sloc

Latest version **0.2.3** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/sloc
pnpm add @types/sloc
yarn add @types/sloc
bun add @types/sloc
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.3 |
| Published | 2023-11-07 |
| First published | 2019-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51442 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/sloc
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sloc
- npm.io page: https://npm.io/package/@types/sloc

## Recent versions

- 0.2.3 (latest) — 2023-11-07
- 0.2.0 (ts2.1) — 2019-10-25
- 0.2.2 — 2023-10-18
- 0.2.1 — 2023-09-25

## README

# Installation
> `npm install --save @types/sloc`

# Summary
This package contains type definitions for sloc (https://github.com/flosse/sloc#readme).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sloc.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/sloc/index.d.ts)
````ts
declare function sloc(code: string, extension: string, options?: sloc.Options): Record<sloc.Key, number>;

declare namespace sloc {
    const keys: Key[];

    const extensions: Extension[];

    interface Options {
        debug: boolean;
    }

    type Extension =
        | "asm"
        | "brs"
        | "c"
        | "cc"
        | "clj"
        | "cljs"
        | "cls"
        | "coffee"
        | "cpp"
        | "cr"
        | "cs"
        | "css"
        | "cxx"
        | "erl"
        | "f90"
        | "f95"
        | "f03"
        | "f08"
        | "f18"
        | "fs"
        | "fsi"
        | "fsx"
        | "go"
        | "groovy"
        | "gs"
        | "h"
        | "handlebars"
        | "hbs"
        | "hpp"
        | "hr"
        | "hs"
        | "html"
        | "htm"
        | "hx"
        | "hxx"
        | "hy"
        | "iced"
        | "ily"
        | "ino"
        | "jade"
        | "java"
        | "jl"
        | "js"
        | "jsx"
        | "mjs"
        | "kt"
        | "kts"
        | "latex"
        | "less"
        | "ly"
        | "lua"
        | "ls"
        | "ml"
        | "mli"
        | "mochi"
        | "monkey"
        | "mustache"
        | "nix"
        | "nim"
        | "nut"
        | "php"
        | "php5"
        | "pl"
        | "py"
        | "r"
        | "rb"
        | "rkt"
        | "rs"
        | "sass"
        | "scala"
        | "scss"
        | "sty"
        | "styl"
        | "svg"
        | "sql"
        | "swift"
        | "tex"
        | "ts"
        | "tsx"
        | "vb"
        | "vue"
        | "xml"
        | "yaml"
        | "m"
        | "mm"
        | "bsl";

    type Key = "total" | "source" | "comment" | "single" | "block" | "mixed" | "blockEmpty" | "empty" | "todo";
}

export = sloc;

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
 * Dependencies: none

# Credits
These definitions were written by [Gary King](https://github.com/garyking).

---
_Source: https://npm.io/package/@types/sloc · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
