namespace Person {
export function setName(name: string) {
return name
}
}
const res = Person.setName("john doe")
console.log(res)
import { CoreApi as MidtransCoreApi } from './lib/coreApi'
import { Snap as MidtransSnap } from './lib/snap'
import { Iris as MidtransIris } from './lib/iris'
export namespace MidtransClient {
export class CoreApi extends MidtransCoreApi {}
export class Snap extends MidtransSnap {}
export class Iris extends MidtransIris {}
}
/*
The namespace is used for logical grouping of functionalities.
A namespace can include interfaces, classes, functions and variables
to support a single or a group of related functionalities.
*/
namespace Vehicle {
const name = "Toyota"
export function getName () {
return `${name}`
}
}
Vehicle.getName() //Toyota