Add an example of importing non-browser functions

Closes #208
This commit is contained in:
Alex Crichton
2018-05-23 12:06:49 -07:00
parent 4ddd93d75d
commit 151acf8eb3
12 changed files with 142 additions and 0 deletions

View File

@ -0,0 +1,21 @@
export function name() {
return 'World';
}
export class MyClass {
constructor() {
this._number = 42;
}
get number() {
return this._number;
}
set number(n) {
return this._number = n;
}
render() {
return `My number is: ${this.number}`;
}
}