Property 'attach' does not exist on type 'Terminal'. ts(2339)
See original GitHub issueI 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)
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:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Lol yeah well it just got released 😄
Updating website in https://github.com/xtermjs/xtermjs.org/pull/88