工厂在两个打字稿文件之间进行选择

I have two files with name AbcWrapperScript.ts and XyzWrapperScript.ts In run time based on some condition I need to switch between accessing these files. How can I achieve this in typescript.

AbcWrapperScript.ts包含

export const AbcWrapperScript: string = "Abc"

XyzWrapperScript.ts包含

export const XyzWrapperScript: string = "Xyz"
评论