Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import externs #46

Closed
pannous opened this issue Mar 19, 2018 · 4 comments
Closed

import externs #46

pannous opened this issue Mar 19, 2018 · 4 comments
Labels

Comments

@pannous
Copy link

pannous commented Mar 19, 2018

how can one import unresolved externs, like in wast:
(import "console" "log" (func $log_i32 (param i32)))

@dcodeIO
Copy link
Member

dcodeIO commented Mar 19, 2018

To achieve the same as in text format above:

namespace console {
  export declare function log(v: i32): void;
}

@pannous
Copy link
Author

pannous commented Mar 19, 2018

works, wonderful, thanks.

I just need to adopt utf-16 now
console.logs("HAHA")
� // ACK 0x06 ;)

@pannous pannous closed this as completed Mar 19, 2018
@dcodeIO
Copy link
Member

dcodeIO commented Mar 20, 2018

Should now also be possible to rely on 'ambient' flags being passed around properly, like in:

declare namespace console {
  export function log(v: i32): void;
}

@WolfieWerewolf
Copy link

Great question and answer... thank you both.

radu-matei pushed a commit to radu-matei/assemblyscript that referenced this issue Oct 13, 2020
Bumps [assemblyscript](https://github.com/AssemblyScript/assemblyscript) from 0.13.2 to 0.13.3.
- [Release notes](https://github.com/AssemblyScript/assemblyscript/releases)
- [Commits](AssemblyScript/assemblyscript@v0.13.2...v0.13.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants