%dw 2.0

type User = {name: String}

fun test(user: {name: String}) = user

fun test2(user: User) = user

fun test3(user: String | User ) = user

fun test4(user: String) = user

fun test5(user: String | {}) = user

fun test6(user: String & Number) = user
---
test({name: "Peter"})