How to use an interface to define a class with a constructor

problem description

I have a requirement now

interface IGun {
    (putBullet: number):void;
    shot():void;
}
class Gun implements IGun {
    bulletCount: number = 0;
    construtor(putBullet: number) {
        this.bulletCount = putBullet;
    }
    shot() {
        // shotting bullet in boundary of bulletCount;
    }
}

the environmental background of the problems and what methods you have tried

interface IGun {
    constructor(putBullet: number):void;
    shot():void;
}

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

both definitions of interface are wrong. I want to know how to define them correctly.
I need help! Please!

Dec.24,2021


class Gun implements IGun {
    bulletCount: number = 0;
    "construtor"(putBullet: number) {
        this.bulletCount = putBullet;
    }
    shot() {
        // shotting bullet in boundary of bulletCount;
    }
}

take a look at link description

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eaa3cd-1fc2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eaa3cd-1fc2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?