[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: typescript [was: Re: How to write (existential) p

Subject: Re: typescript [was: Re: 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
Re: typescript [was: Re:  How to write (existential)  p
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.