Skip to content

semantic error TS2339: Property 'write' does not exist on type 'Clipboard' -- can't repro #306

@wamujlb

Description

@wamujlb

What happens and why it is wrong

(rpt2 plugin) Error: ../...tsx(48,34): semantic error TS2339: Property 'write' does not exist on type 'Clipboard'.

I'm trying to use clipboard.write API but it throws an error on compilation.

Environment

Node 16

Versions
npmPackages:
    typescript: ^4.5.5 => 4.6.2
    rollup-plugin-typescript2: ^0.31.2

tsconfig.json

`tsconfig.json`:
{
  "compilerOptions": {
    "outDir": "dist",
    "module": "esnext",
    "target": "ESNext",
    "lib": ["dom", "esnext"],
    "moduleResolution": "node",
    "jsx": "react",
    "sourceMap": true,
    "declaration": true,
    "esModuleInterop": true,
    "downlevelIteration": true,
    "noImplicitReturns": true,
    "noImplicitThis": true,
    "noImplicitAny": true,
    "strictNullChecks": true,
    "suppressImplicitAnyIndexErrors": true,
    "noUnusedLocals": true,
    "noUnusedParameters": true,
    "allowSyntheticDefaultImports": true,
    "typeRoots": ["node_modules/@types", "src/lib-types"],
    "types": ["resize-observer-browser"]
  },
  "include": ["src", "scripts"],
  "exclude": ["node_modules", "dist", "example"],
  "paths": {
    "@src/*": ["./src/*"],
    "@types/*": ["./src/types"],
    "@components/*": ["./components/*"]
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: supportAsking for support with something or a specific use caseproblem: needs more infoThis issue needs more information in order to handle itproblem: no reproNo reproduction was provided (and have not tried to repro without one)problem: removed issue templateOP removed the issue template without good causeproblem: staleIssue has not been responded to in some timesolution: can't reproAn attempt to reproduce has been tried and failedsolution: workaround availableThere is a workaround available for this issuetopic: TS versionRelated to a change in a TS version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions