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

TypeScript Support #226

Closed
wants to merge 8 commits into from
Closed

TypeScript Support #226

wants to merge 8 commits into from

Conversation

RommelTJ
Copy link

@RommelTJ RommelTJ commented Aug 26, 2020

Reference Issue

Resolves #205

Description

Adds TypeScript declaration file describing all the galio framework components so that TypeScript projects using the galio-framework can benefit from auto-completion.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Changes

  • Adds src/index.d.ts Typescript declaration file

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.

@RommelTJ RommelTJ marked this pull request as ready for review August 27, 2020 05:42
@RommelTJ RommelTJ changed the title WIP: TypeScript Support TypeScript Support Aug 27, 2020
@RommelTJ RommelTJ mentioned this pull request Nov 30, 2020
@RommelTJ
Copy link
Author

@palingheorghe @hetmann @yasintz This Pull Request has been pending since August 26. Have you guys given any thought to adding TypeScript support to Galio Framework? If so, could I get some feedback or an assigned reviewer? Thanks in advance. I apologize for all the mentions but it wasn't clear who the best contact would be.

@markronquillo
Copy link

markronquillo commented Dec 11, 2020

@RommelTJ while we wait for your PR to be merged, is there a way to include the .d.ts file in our project manually?

I tried to copy the .d.ts and refer it to my project in tsconfig.json, but it says "Invalid module name in augmentation. Module 'galio-framework' resolves to an untyped module ". Do you have an idea on how to fix?

@RommelTJ
Copy link
Author

@markronquillo What I originally did was forked this project, add the types to that, and then override your project's package.json to point to that repo, i.e. "galio-framework": "git+https://github.com/YOUR_USER/galio-framework.git",

However, I didn't want to get out of sync in case this repo got updates, so I backed out of that and instead I just created my own TypeScript wrapper components that extend the Galio components and added a bunch of ignore statements, e.g.

// @ts-ignore
import { Button } from 'galio-framework';

@RommelTJ RommelTJ closed this Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

typescrypt support
2 participants