Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: export types explicitly #923

Merged
merged 1 commit into from
Apr 4, 2024
Merged

fix: export types explicitly #923

merged 1 commit into from
Apr 4, 2024

Conversation

ncalteen
Copy link
Contributor

@ncalteen ncalteen commented Apr 4, 2024

Before the change?

  • When importing types into a TypeScript project, the latest release was causing a Module '"@octokit/graphql-schema"' has no exported member '<name>'. error.
import type { Reaction } from '@octokit/graphql-schema'

This error was experienced in a TypeScript project with the following configuration:

  • Node.js v21.6.2
  • TypeScript 5.4.3
  • TSConfig:
{
  "$schema": "https://json.schemastore.org/tsconfig",
  "compilerOptions": {
    "baseUrl": "./",
    "declaration": true,
    "declarationMap": false,
    "esModuleInterop": true,
    "forceConsistentCasingInFileNames": true,
    "lib": ["ES2022"],
    "module": "NodeNext",
    "moduleResolution": "NodeNext",
    "newLine": "lf",
    "noImplicitAny": true,
    "noUnusedLocals": true,
    "noUnusedParameters": false,
    "pretty": true,
    "resolveJsonModule": true,
    "sourceMap": true,
    "strict": true,
    "strictNullChecks": true,
    "target": "ES2022",
    "verbatimModuleSyntax": true
  }
}

After the change?

  • This attempts to resolve the error by explicitly importing and exporting types from schema.d.ts into index.d.ts

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

Copy link
Contributor

github-actions bot commented Apr 4, 2024

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

@wolfy1339 wolfy1339 merged commit 4aa5a4b into octokit:main Apr 4, 2024
6 checks passed
Copy link
Contributor

github-actions bot commented Apr 4, 2024

🎉 This PR is included in version 15.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants