1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【メモ】DenoでOctokitのRestを使う

Posted at

一日溶かしたので以降の方はすぐに解決できるように残しておきます

TL;DR

Restを使いたいだけの場合

import { Octokit as OctokitCore } from 'https://cdn.skypack.dev/@octokit/core?dts';
import { restEndpointMethods } from 'https://cdn.skypack.dev/@octokit/plugin-rest-endpoint-methods?dts';

export const Octokit = OctokitCore.plugin(restEndpointMethods);

事象

OctokitをSkypack経由で読み込んで

import { Octokit } from 'https://cdn.skypack.dev/@octokit/rest?dts';
const octokit = new Octokit();
//    ^? octokit: any

とこのようにanyなってしまう事象に遭遇した。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?