mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
fix require in the only way I know that works at runtime
This commit is contained in:
Vendored
+1
@@ -2,6 +2,7 @@
|
||||
// Project: https://github.com/jotform/css.js
|
||||
// Definitions by: Peter van der Woude <https://github.com/pandawood>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import cssjsGlobal = require("../jotform-css.js")
|
||||
let cssjsGlobal = require("jotform-css.js")
|
||||
import { CssJs } from "./index"
|
||||
|
||||
// not all interface methods tested here, below is a sample of code that I've actually used
|
||||
class TestParser {
|
||||
public parse(cssString: string): string {
|
||||
const parser = new (<any>cssjsGlobal).cssjs() as CssJs
|
||||
const parser = new cssjsGlobal.cssjs() as CssJs
|
||||
|
||||
let parsed = parser.parseCSS(cssString)
|
||||
parsed = parser.applyNamespacing(parsed, "#id1")
|
||||
|
||||
Reference in New Issue
Block a user