https://kotlinlang.org logo
#speaking
Title
# speaking
o

Omar Miatello

03/17/2018, 3:55 PM
Hi guys, a few days ago I spoke at the Kotlin Night Milano conference. I created a small “Starter-kit for Cloud Functions + Kotlin for JavaScript” for those who want to try these technologies! https://speakerdeck.com/jacklt/google-cloud-functions-try-kotlin-insteadof-javascript Let me know what you think and leave me a comment! 😄
❤️ 4
👍 3
g

gildor

03/20/2018, 1:12 AM
Nice presentation. Also played some time ago with Firebase Functions and Kotlin Js. Just a couple comments You use
external val exports
, currently this is the only way, but if this change will be made in Kotlin Js you can define firebase functions just like top level val:
Copy code
val myFunction = fireFunctions.https.onRequest{}
https://youtrack.jetbrains.com/issue/KT-19016#comment=27-2505111 There is my comment explains problem with top level val Also instead of using external require, you can define it in more Kotlin-js way:
Copy code
@file:JsModule("firebase-functions")
package functions

external val https: dynamic
So now you can just import required API of functions, without explicit import