Closed icetortoise closed 3 years ago
This isn't a bug with deno, but with our documentation. There isn't any Action
client in octokit.js
as of yet.
You can use @octokit/action
in the mean time
OK, thanks for looking into this so quickly.
I am still seeing issues though, the script looks like this now:
import { Octokit, App} from "https://cdn.skypack.dev/octokit?dts";
const o = new Octokit();
console.warn(`${JSON.stringify(o)}`);
This prints
{"log":{},"rest":{"actions":{},"activity":{},"apps":{},"billing":{},"checks":{},"codeScanning":{},"codesOfConduct":{},"emojis":{},"enterpriseAdmin":{},"gists":{},"git":{},"gitignore":{},"interactions":{},"issues":{},"licenses":{},"markdown":{},"meta":{},"migrations":{},"orgs":{},"packages":{},"projects":{},"pulls":{},"rateLimit":{},"reactions":{},"repos":{},"search":{},"secretScanning":{},"teams":{},"users":{}},"retry":{}}
However, if I try to access o.projects
I get compilation error saying such property does not exist.
It seems like the type definitions are not picked up by tsc?
it's o.rest.projects
Also note that there is a known problem with Deno right now, likely related to our dependency on Bottleneck, see the thread at https://github.com/octokit/octokit.js/issues/2075
Thanks for the pointer.
o.rest.projects
does not work either, compiler complains rest
is missing in this case.
It does work in the browser:
import("https://cdn.skypack.dev/octokit").then(pkg => {
const octokit = new pkg.Octokit()
console.log(octokit.rest.projects)
})
so I assume it's probably related to the problem described at #2075
closing in favor of #2075
I am trying out the deno example in the README, and it does not work: