Reputation: 7640
I am using a library that is "smartly" exporting a namespace Math
from their library
import { Tool, Math } from 'library';
The problem is, when I use the library's Math, I am also using some native Math function from the browser.
Is there a way to specify which namespace to use ?
Math.customLib()
Math.nativeMath()
how to tell ts which one to use ?
Upvotes: 1
Views: 48
Reputation: 1789
Use the as
syntax to create the import item name.
import { Tool, Math as MathFromLibrary } from 'library';
Upvotes: 2