Typescript: how to extend types definition with custom types

Created on 7 Jul 2018  路  5Comments  路  Source: microsoft/TypeScript

Hello collegs! I install this types.
This file looks like this.

But that types do not include some very helpfull types like ClientState. I want add to that types this enum:

enum ClientState {
        DISCONNECTED,
        CONNECTING,
        CONNECTED,
        LOGGING_IN,
        LOGGED_IN,
    }

I wanna add this enum to _namespace VoxImplant_
How can I do it?
My tsconfig :heart:

{
  "compilerOptions": {
    "baseUrl": ".",
    "outDir": "./build_ts",
    "allowJs": true,
    "target": "es5",
    "sourceMap": false,
    "noImplicitAny": true,
    "module": "es2015",
    "moduleResolution": "node",
    "jsx": "react",
    "allowSyntheticDefaultImports": true,
    "lib": [
      "dom",
      "es2016"
    ],
    "paths":{
      "*": [
        "*",
        "./types/*"
      ]
    },
    "typeRoots": [
      "./types",
      "./node_modules/@types"
    ]
  },
  "include": [
    "./app/**/*"
  ]
}
Question

Most helpful comment

It is more logical to allow the creators of the language focus on fixing on adding features and fixing bugs. Also the creators of the language actively participate in StackOverflow and Gitter. It is rude to assume you deserve some level of special attention, just because you feel you do.

All 5 comments

This is not a support forum.

Questions should be asked at StackOverflow or on Gitter.im.

It is more logical to ask the creators of the language than random users

It is more logical to allow the creators of the language focus on fixing on adding features and fixing bugs. Also the creators of the language actively participate in StackOverflow and Gitter. It is rude to assume you deserve some level of special attention, just because you feel you do.

If there's some way we could make it more clear that the issue tracker is not for questions, I would very much like to hear it. The first page of the "New Issue" workflow says "The issue tracker is not for questions. Please use Stack Overflow or other resources for help writing TypeScript code.", and then the first line of the template is "THE ISSUE TRACKER IS NOT FOR QUESTIONS. DO NOT CREATE A NEW ISSUE TO ASK A QUESTION.".

Is there some entry point to the New Issue form that skipped those?

Is there some entry point to the New Issue form that skipped those?

CTRL+A then DELETE is the workaround you were missing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kyasbal-1994 picture kyasbal-1994  路  3Comments

manekinekko picture manekinekko  路  3Comments

DanielRosenwasser picture DanielRosenwasser  路  3Comments

bgrieder picture bgrieder  路  3Comments

Roam-Cooper picture Roam-Cooper  路  3Comments