From 8617661679570a4c38e9338d6ec50e99b1005c5a Mon Sep 17 00:00:00 2001 From: David Graham Date: Mon, 7 Oct 2019 19:13:13 -0600 Subject: [PATCH] Include module in Flow declaration Fixes an error importing the class. `import ClipboardCopyElement from '@github/clipboard-copy-element` > Error: Importing from an untyped module makes it `any` and is not safe! --- src/clipboard-copy-element.js.flow | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/clipboard-copy-element.js.flow b/src/clipboard-copy-element.js.flow index aa2838f..c450163 100644 --- a/src/clipboard-copy-element.js.flow +++ b/src/clipboard-copy-element.js.flow @@ -1,6 +1,8 @@ /* @flow strict */ -declare export default class ClipboardCopyElement extends HTMLElement { - get value(): string; - set value(value: string): void; +declare module '@github/clipboard-copy-element' { + declare export default class ClipboardCopyElement extends HTMLElement { + get value(): string; + set value(value: string): void; + } }