question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Better usability when type checking

See original GitHub issue
import { h, jsx, serve} from "https://deno.land/x/sift@0.3.0/mod.ts";

const App = () => (
  <div>
    <h1>Hello Work!</h1>
  </div>
);

const NotFound = () => (
  <div>
    <h1>Page not found</h1>
  </div>
);

serve({
  "/": () => jsx(<App />),
  404: () => jsx(<NotFound />, { status: 404 }),
});
# deployctl run index.tsx
Check file:///Users/ry/src/deploy-website/$deno$eval.ts
error: TS6200 [ERROR]: Definitions of the following identifiers conflict with those in another file: DOMException, Event, EventTarget, EventListenerOrEventListenerObject, ProgressEvent, TextDecoder, TextEncoder, AbortController, URLSearchParams, URL, ReadableStreamReader, CountQueuingStrategy, ByteLengthQueuingStrategy, BlobPart, Blob, File, FormDataEntryValue, FormData, HeadersInit, Headers, RequestInfo, RequestCache, RequestCredentials, RequestMode, RequestRedirect, ReferrerPolicy, BodyInit, RequestDestination, Request, ResponseType, Response, CloseEvent, WebSocket, BinaryType, CompileError, Global, Instance, LinkError, Memory, Module, RuntimeError, Table, ImportExportKind, TableKind, ValueType, ExportValue, Exports, ImportValue, ModuleImports, Imports, BufferSource, MessageEvent, ErrorEvent, CustomEvent, Window
interface Account {
~~~~~~~~~
    at asset:///lib.dom.d.ts:25:1

    Conflicts are in this file.
    declare class DOMException extends Error {
    ~~~~~~~
        at file:///Users/ry/Library/Caches/deno/https/deno.land/a54873ce745491942abde8874b5ea92f343a9be4a5413e78dfe7c94fcfe2b201.ts:11:1

however works with

 deployctl run --libs=ns,fetchevent  index.tsx

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
kitsonkcommented, May 27, 2021

Another point I forgot:

  • We can type check properly without having to lazily write a tsconfig.json, we just need to use more triple slash directives in the “wrapping” module:

    /// <reference no-default-lib="true"/>
    /// <reference lib="esnext" />
    /// <reference path="./types/deploy.ns.d.ts" />
    /// <reference path="./types/deploy.fetchevent.d.ts" />
    /// <reference path="./types/deploy.window.d.ts" />
    
0reactions
lucacasonatocommented, Oct 17, 2021

Thanks for contributing by opening an issue.

This project is being archived because you can now use deno run to run your Deploy scripts locally: https://deno.com/deploy/docs/running-scripts-locally/. As such, I will close this issue.

If you have feedback about Deno Deploy, please open an issue on this repo: https://github.com/denoland/deploy_feedback

Read more comments on GitHub >

github_iconTop Results From Across the Web

8 Usability Testing Methods That Work (Types + Examples)
A breakdown of the main usability testing methods (includes lab testing, session recordings, card sorting) and when/why you should use them.
Read more >
20 tips on how to run better usability testing sessions - Bootcamp
Advice #1: Do not schedule more than 3 sessions per day. A usability testing session requires a lot of mental effort from your...
Read more >
Usability Testing 101 - Nielsen Norman Group
Usability testing can be either qualitative or quantitative. Qualitative usability testing focuses on collecting insights, findings, and ...
Read more >
What is Usability Testing? Types, Benefits, Examples and More
Usability testing is a crucial tool for developing great products. Unlike most forms of software testing, usability testing involves the user of ...
Read more >
How to Write More Effective Usability Testing Tasks
If you are trying to get users to "sign-up," "check-out," or "add to cart," and those words are in your interface, don't include...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found