Skip to content

Instantly share code, notes, and snippets.

@victorvhpg
Created November 12, 2016 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victorvhpg/d58a24932495e6940de697098138d226 to your computer and use it in GitHub Desktop.
Save victorvhpg/d58a24932495e6940de697098138d226 to your computer and use it in GitHub Desktop.
//importando apenas um identificador
import {algumaCoisa} from "./modulo-teste.js";
//importando apenas um identificador e renomeando
import {algumaCoisa as teste} from "./modulo-teste.js";
//importando vários identificadores
import {algumaCoisa, Pokemon, soma} from "./modulo-teste.js"
//importando o modulo inteiro
import * as moduloTeste from "./modulo-teste.js";
console.log(moduloTeste.algumaCoisa()); //"alguma coisa"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment