Skip to content

Instantly share code, notes, and snippets.

@steelydylan
Created December 14, 2018 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steelydylan/fc0599bade91d90a02b02819dc19600e to your computer and use it in GitHub Desktop.
Save steelydylan/fc0599bade91d90a02b02819dc19600e to your computer and use it in GitHub Desktop.
もともとglobalに出ているjsライブラリをTypeScriptで定義しておく方法
import { XmlData } from './type';
declare global {
namespace JKL {
class ParseXML {
constructor(path: string)
parse(): XmlData
}
}
}
@steelydylan
Copy link
Author

new JKL.ParseXml()が使える

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment