Re: typescript [was: Re: [xsl] How to write (existential) predicates with maps/Why is there no effective boolean value for a map?]

Subject: Re: typescript [was: Re: [xsl] How to write (existential) predicates with maps/Why is there no effective boolean value for a map?]
From: "Mukul Gandhi gandhi.mukul@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 14 Feb 2019 12:08:14 -0000
On Wed, Feb 13, 2019 at 4:38 PM Liam R. E. Quin liam@xxxxxxxxxxxxxxxx <
xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote:

> > [garbled gibberish here]
>

Sorry, that was I think the problem of mailer.


> Ungarbling, i get,
> class Student {
>     fullName: string;
>     constructor(public firstName: string, public middleInitial: string,
> public lastName: string) {
>         this.fullName = firstName + " " + middleInitial + " " + lastName;
>     }
> }
>
> interface Person {
>     firstName: string;
>     lastName: string;
> }
>
> function greeter(person : Person) {
>     return "Hello, " + person.firstName + " " + person.lastName;
> }
>
> let user = new Student("Jane", "M.", "User");
>
> document.body.innerHTML = greeter(user);
>
> So you are asking, does a Student object confom to the Person
> interface?  That is, does the object have the required public fields.
> We can see by inspection that it does.


Current Thread