Skip to content

Conversation

@imhuay
Copy link
Contributor

@imhuay imhuay commented Jul 13, 2018

Have tested at TypeScript Playground

class Greeter {
    greeting: string;
    constructor(message: string) {
        this.greeting = message.trim().replace(/[……\]\[。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}\!\'\#\$\%\&\'\(\)\*\+\,\.\/\:\;\<\=\>\?\@\\\^\_\{\|\}\~\`]/g, '');
    }
    greet() {
        return "Hello, " + this.greeting;
    }
}

let greeter = new Greeter("abc。,、;:?!…—·ˉ¨‘’“”々~‖∶"'`|〃〔〕〈〉《》「」『』.〖〗【】()[]{}world");

let button = document.createElement('button');
button.textContent = "Say Hello";
button.onclick = function() {
    alert(greeter.greet());
}

document.body.appendChild(button);

@mjbvz mjbvz added this to the July 2018 milestone Jul 18, 2018
@mjbvz mjbvz merged commit 9038bc7 into microsoft:master Jul 18, 2018
@mjbvz
Copy link
Collaborator

mjbvz commented Jul 18, 2018

Thanks!

@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants