const a:never[]=[]
const b:string[] = a // never[] CAN assign to string[]
const c=(d:never)=>{}
c(1) // number cant assign to never
const d =(e:string[])=>{}
d(a) // never[] CAN assign to string[]
const e = (f:never[])=>{}
e(b) // string[] cant assign to never[]
const f:never = 1 as never
const g:string = f // never CAN assign to string
console.log(g.toLowerCase()) // runtime error!!
what is the typescript justification of able to assign never
to other types?
it can cause runtime error as shown in the last line of the code