Adding a property to a third party class in TypeScript

I’ve been on the TypeScript gitter and this is the best we’ve come up with:

import * as express from 'express';
import * as http from 'http';
import * as WebSocket from 'ws';

const app = express();
const server = http.createServer(app);
const wss = new WebSocket.Server({ server });

// ******* THIS IS THE IMPORTANT BIT  ********
interface WebSocketWithStatus extends WebSocket {
  isAlive?: boolean;
}

function heartbeat(this: WebSocketWithStatus) {
  this.isAlive = true;
}

function onConnection(ws: WebSocketWithStatus) {
  ws.isAlive = true;
  ws.on('pong', heartbeat);
}

wss.on('connection', onConnection);

Beats (ws as any).isAlve but it feels like there should be something better.

Resist, My People, Resist Them

Resist, my people, resist them.
In Jerusalem, I dressed my wounds and breathed my sorrows
And carried the soul in my palm
For an Arab Palestine.
I will not succumb to the “peaceful solution,”
Never lower my flags
Until I evict them from my land.
I cast them aside for a coming time.
Resist, my people, resist them.
Resist the settler’s robbery
And follow the caravan of martyrs.
Shred the disgraceful constitution
Which imposed degradation and humiliation
And deterred us from restoring justice.
They burned blameless children;
As for Hadil, they sniped her in public,
Killed her in broad daylight.
Resist, my people, resist them.
Resist the colonialist’s onslaught.
Pay no mind to his agents among us
Who chain us with the peaceful illusion.
Do not fear doubtful tongues;
The truth in your heart is stronger,
As long as you resist in a land
That has lived through raids and victory.
So Ali called from his grave:
Resist, my rebellious people.
Write me as prose on the agarwood;
My remains have you as a response.
Resist, my people, resist them.
Resist, my people, resist them.

https://www.aljazeera.com/news/2018/05/arabs-jaii-israel-convicts-palestinian-poem-180503161402330.html

An Omelette

One day young captain Jonathan,
he was eighteen at the time,
Captured a Pelican
On an island in the Far East
In the morning,
This Pelican
of Jonathan’s
Laid a white egg
and out of it came
a Pelican
Astonishingly like the first.
And this second Pelican
laid in its turn
A white egg,
from which came inevitably
Another
who did the same again.
This sort of thing can go on
A very long time,
if you don’t make an omelette.

Robert Desnos: Chantefleurs, Chantefables
Translated from the French by Elizabeth McGovern