question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'attach' does not exist on type 'Terminal'. ts(2339)

See original GitHub issue

I know this is a Typescript thing but I’m a bit stuck. I’ve tried asking this question over on StackOverflow but I’ve had no responses or comments so I’m wondering if anyone else can help.

I’m trying to use the attach addon for xtermjs in Typescript but I’m getting the error:

Property 'attach' does not exist on type 'Terminal'.ts(2339)
Screenshot 2019-09-11 at 09 27 00

Here is my example code:

import { Terminal } from "xterm";
import * as attach from "xterm/lib/addons/attach/attach";


Terminal.applyAddon(attach);
var socket = new WebSocket(
  "wss://docker.example.com/containers/mycontainerid/attach/ws"
);
const term = new Terminal();
term.attach(socket);

I can ignore the error but I wanted to know if there is anything I can do to not?

Here is an example Codesandbox with the error happening (in a React app)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jerchcommented, Sep 11, 2019

Lol yeah well it just got released 😄

0reactions
Tyriarcommented, Sep 11, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript Error TS2339: Property does not exist on type ...
You are trying to access the attribute on the array of LogRepair that is why the error message includes the square brackets after...
Read more >
Property does not exist on type Request in TypeScript
The "Property does not exist on type Request" error occurs when we access a property that does not exist in the Request interface....
Read more >
property 'title' does not exist on type 'never'.ts(2339) - You.com
TS throws: Property '$page' does not exist on type 'CombinedVueInstance<Vue, unknown, unknown, unknown, Readonly<Record<never, any>>>'.Vetur(2339).
Read more >
TypeScript Compiling with Visual Studio Code
Typically the first step in any new TypeScript project is to add a ... HelloWorld.ts(3,17): error TS2339: Property 'logg' does not exist on...
Read more >
Property 'subscribe' does not exist on type 'void'. - CodeProject
nnnnnnnnnnnnnnnnScript //user.component.ts onSubmit(form: NgForm) { this.insertRecord(form) } insertRecord(form: NgForm) { this.service.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found