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

index.d.ts file with semanticUIReact #1392

Closed
oldrich-s opened this issue Feb 27, 2017 · 3 comments
Closed

index.d.ts file with semanticUIReact #1392

oldrich-s opened this issue Feb 27, 2017 · 3 comments
Assignees

Comments

@oldrich-s
Copy link

How can I have typed semanticUIReact in a TypeScript file? I have tried:

/// <reference path="../node_modules/semantic-ui-react/index.d.ts" />
const { Menu } = semanticUIReact

But I get cannot find name semanticUIReact error.

@layershifter
Copy link
Member

@czb Use import:

import { Menu } from 'semantic-ui-react'

With reference you will get only to import type information which doesn't makes sense there.

@oldrich-s
Copy link
Author

@layershifter I do not want to use ES6 modules... Is it not possible to include export as namespace semanticUIReact; into the .d.ts file to allow consuming it via semanticUIReact?

@layershifter
Copy link
Member

@czb Yes, it makes sense, I'll make a PR.

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

No branches or pull requests

2 participants