@types/sloc
TypeScript icon, indicating that this package has built-in type declarations

0.2.3 • Public • Published

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

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/sloc

Weekly Downloads

2,028

Version

0.2.3

License

MIT

Unpacked Size

6.06 kB

Total Files

5

Last publish

Collaborators

  • types