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
to typescript #1
Conversation
Himenon
commented
Sep 17, 2018
- JS to Typescript
@@ -0,0 +1,157 @@ | |||
import * as dot from 'dot-prop' | |||
import * as glamor from 'glamor/server' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
どうやら、npmに上がっているpackageは型定義ファイルが含まれていない模様。
https://github.com/threepointone/glamor/blob/master/server.d.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
解決した
tsconfig.json
Outdated
"forceConsistentCasingInFileNames": true, | ||
"noImplicitReturns": true, | ||
"noImplicitThis": true, | ||
"noImplicitAny": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
本当はtrueにしたいが、こいつに含まれている
https://github.com/threepointone/glamor
src/Markdown.ts
Outdated
|
||
private applyProps = (scope: any) => { | ||
const { options = {} } = this.props | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
src/createComponents.ts
Outdated
'styled-components': ({ name, type, style, props, system = [] }: StyledOptions, lib: any) => { | ||
const tag = lib[type] || type | ||
const funcs = getFunctions(system) | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
src/jsx.ts
Outdated
@@ -0,0 +1,24 @@ | |||
// @ts-ignore | |||
import * as transformJSX from 'babel-plugin-transform-react-jsx' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
src/jsx.ts
Outdated
// @ts-ignore | ||
import * as transformJSX from 'babel-plugin-transform-react-jsx' | ||
// @ts-ignore | ||
import * as babel from 'babel-standalone' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
src/render.ts
Outdated
const renderPage = (scope: any, opts: Options) => (page: any) => { | ||
const library = opts.library | ||
// @ts-ignore | ||
const Provider = themeProviders[library] || themeProviders.default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
src/render.ts
Outdated
// @ts-ignore | ||
const Provider = themeProviders[library] || themeProviders.default | ||
// @ts-ignore | ||
const getCSS = cssCreators[library] || cssCreators.default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
src/render.ts
Outdated
.get(scope, 'theme.fonts', []) | ||
.map((font: string) => webfont.getLinkTag(font)) | ||
// @ts-ignore | ||
.filter(tag => !!tag) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
1d2527b
to
f38aec0
Compare
次、rename |
87e81db
to
719d97d
Compare