codedamn

Generics

Created by Basarat Ali Syed about a year ago

0

No description provided

2 Comments

    0

    I m getting error that : Argument of type 'T' is not assignable to parameter of type 'never (line 3 item is underlined) class Queue_<T> {

        data = [];

        push(item: T){ this.data.push(item); }

        pop(): T { return this.data.shift(); }

    }

    @vinit

    Vinit Churi

    @vinit

    0

    This code leads to an error !

    @prasadn

    Prasad Nageshkar

    @prasadn

Your comment