app.ts 1.0 KB

123456789101112131415161718192021222324252627282930
  1. function startGame() {
  2. // Starting a new game.
  3. let playerName: string = 'Audrey';
  4. logPlayer(playerName);
  5. const messagesElement: HTMLElement | null = document.getElementById('messages');
  6. // We know messagesElement cannot be null because we control the markup, so
  7. // we can use a non-null type assertion
  8. const element = messagesElement!;
  9. element.innerText = 'Welcome to MultiMath! Starting a new game';
  10. console.log('Starting new game');
  11. }
  12. function logPlayer(name: string) {
  13. console.log(`New game starting for player: ${name}.`);
  14. }
  15. function arm(doc: HTMLDocument) {
  16. // We know getElementById() cannot be null because we control the markup, so
  17. // we can use a non-null type assertion on the function call result.
  18. doc.getElementById('startGame')!.addEventListener('click', startGame);
  19. }
  20. arm(document);
  21. // Type assertions (not casting, more like in Go).
  22. let value: any = 42;
  23. let fixedString1: string = (<number>value).toFixed(2);
  24. let fixedString2: string = (value as number).toFixed(2);
  25. console.log(value, fixedString1, fixedString2);
PANIC: session(release): write data/sessions/1/4/14a77364c24d9cb6: no space left on device

PANIC

session(release): write data/sessions/1/4/14a77364c24d9cb6: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)