Skip to content

tsc lib config to include MS DOM #14938

Closed
@gforceg

Description

@gforceg

TypeScript Version: 2.1.5

I wish I could say something like this in my tsconfig.json:

"lib": [ "es2015", "dom", "dom.microsoft"],

and then I could compile my source without error when it looks like this:

let buffer = 'the buffer you wish to copy'
static POS = !!window.clipboardData

// if IE11, copy buffer to clipboard
if (POS) { window.clipboardData.setData('Text', buffer) }
// if other browser, copy buffer to clipboard
else { Clipboard._data = buffer; document.execCommand('copy')}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions