Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 8, 2020. It is now read-only.

Commit5a977fc

Browse files
committed
repair typings
1 parent16b35dc commit5a977fc

File tree

16 files changed

+84
-86
lines changed

16 files changed

+84
-86
lines changed

‎lib/components/Page/EditPage/index.js

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +0,0 @@
1-
"use strict";
2-
varpath_1=require('path');
3-
varReact=require('react');
4-
varmode_edit_1=require('material-ui/svg-icons/editor/mode-edit');
5-
vareditStyle={
6-
position:'absolute',
7-
top:'10px',
8-
right:'10px',
9-
};
10-
varEditPage=function(_a){
11-
vartutorial=_a.tutorial;
12-
if(tutorial&&tutorial.edit&&tutorial.repo){
13-
varrepoPath=path_1.join(tutorial.repo,'edit','master',tutorial.repo);
14-
return(React.createElement("a",{href:repoPath},
15-
React.createElement(mode_edit_1.default,{style:editStyle})
16-
));
17-
}
18-
};
19-
Object.defineProperty(exports,"__esModule",{value:true});
20-
exports.default=EditPage;

‎lib/components/Page/Hints/HintButton.js

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ var __extends = (this && this.__extends) || function (d, b) {
55
d.prototype=b===null ?Object.create(b) :(__.prototype=b.prototype,new__());
66
};
77
varReact=require('react');
8-
varreact_redux_1=require('react-redux');
9-
varactions_1=require('../../../actions');
10-
varselectors_1=require('../../../selectors');
118
varFlatButton_1=require('material-ui/FlatButton');
129
varHintButton=(function(_super){
1310
__extends(HintButton,_super);
@@ -27,10 +24,5 @@ var HintButton = (function (_super) {
2724
};
2825
returnHintButton;
2926
}(React.Component));
30-
varmapStateToProps=function(state){return({
31-
hintPosition:state.hintPosition,
32-
hintsLength:selectors_1.hintsSelector(state).length,
33-
});};
34-
varmapDispatchToProps={hintPositionSet:actions_1.hintPositionSet};
3527
Object.defineProperty(exports,"__esModule",{value:true});
36-
exports.default=react_redux_1.connect(mapStateToProps,mapDispatchToProps)(HintButton);
28+
exports.default=HintButton;

‎lib/components/Page/Hints/index.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ var index_1 = require('../../index');
1111
varHintButton_1=require('./HintButton');
1212
varCard_1=require('material-ui/Card');
1313
varhelp_1=require('material-ui/svg-icons/action/help');
14+
varactions_1=require('../../../actions');
15+
varselectors_2=require('../../../selectors');
1416
varstyles={
1517
position:'relative',
1618
margin:'5px auto 10px',
@@ -23,23 +25,26 @@ var Hints = (function (_super) {
2325
_super.apply(this,arguments);
2426
}
2527
Hints.prototype.render=function(){
26-
varhint=this.props.hint;
28+
var_a=this.props,hint=_a.hint,hintPosition=_a.hintPosition,hintsLength=_a.hintsLength,hintPositionSet=_a.hintPositionSet;
2729
if(!hint){
2830
returnnull;
2931
}
3032
return(React.createElement(Card_1.Card,{style:styles},
3133
React.createElement(Card_1.CardHeader,{title:'Hints',avatar:React.createElement(help_1.default,null),actAsExpander:true,showExpandableButton:true}),
3234
React.createElement(Card_1.CardText,{className:'cr-task-hint',expandable:true},
33-
React.createElement(index_1.Markdown,null,hint)
35+
React.createElement(index_1.Markdown,{children:hint})
3436
),
3537
React.createElement(Card_1.CardActions,{style:{paddingBottom:'30px !important'},expandable:true,className:'cr-task-hints-actions'},
36-
React.createElement(HintButton_1.default,{type:'prev',label:'Previous'}),
37-
React.createElement(HintButton_1.default,{type:'next',label:'Next'}))));
38+
React.createElement(HintButton_1.default,{type:'prev',label:'Previous',hintPosition:hintPosition,hintsLength:hintsLength,hintPositionSet:hintPositionSet}),
39+
React.createElement(HintButton_1.default,{type:'next',label:'Next',hintPosition:hintPosition,hintsLength:hintsLength,hintPositionSet:hintPositionSet}))));
3840
};
3941
returnHints;
4042
}(React.Component));
4143
varmapStateToProps=function(state){return({
4244
hint:selectors_1.hintSelector(state),
45+
hintPosition:state.hintPosition,
46+
hintsLength:selectors_2.hintsSelector(state).length,
4347
});};
48+
varmapDispatchToProps={hintPositionSet:actions_1.hintPositionSet};
4449
Object.defineProperty(exports,"__esModule",{value:true});
45-
exports.default=react_redux_1.connect(mapStateToProps)(Hints);
50+
exports.default=react_redux_1.connect(mapStateToProps,mapDispatchToProps)(Hints);

‎lib/components/common/ContentCard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ var ContentCard = function (_a) {
1212
return(React.createElement(Card_1.Card,{style:styles.card},
1313
title ?React.createElement(Card_1.CardHeader,{title:title}) :null,
1414
React.createElement(Card_1.CardText,null,
15-
React.createElement(index_1.Markdown,null,content||'')
15+
React.createElement(index_1.Markdown,{children:content||''})
1616
)));
1717
};
1818
Object.defineProperty(exports,"__esModule",{value:true});

‎src/components/AppMenu/MenuLink/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const styles = {
1010
};
1111

1212
classMenuLinkextendsReact.Component<{
13-
route:string,title?:string,routeSet:any
13+
route:string,title?:string,routeSet?:any
1414
},{}>{
1515
publicrender(){
1616
const{route, title, routeSet}=this.props;
Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
1-
import{join}from'path';
2-
import*asReactfrom'react';
1+
//import { join } from 'path';
2+
//import * as React from 'react';
33

4-
importModeEditfrom'material-ui/svg-icons/editor/mode-edit';
5-
importNavigationClosefrom'material-ui/svg-icons/navigation/close';
4+
//import ModeEdit from 'material-ui/svg-icons/editor/mode-edit';
5+
//import NavigationClose from 'material-ui/svg-icons/navigation/close';
66

7-
consteditStyle={
8-
position:'absolute',
9-
top:'10px',
10-
right:'10px',
11-
};
7+
//const editStyle = {
8+
// position: 'absolute',
9+
// top: '10px',
10+
// right: '10px',
11+
//};
1212

13-
constEditPage:React.StatelessComponent<{
14-
tutorial:Tutorial.Config
15-
}>=({tutorial})=>{
16-
if(tutorial&&tutorial.edit&&tutorial.repo){
17-
constrepoPath=join(tutorial.repo,'edit','master',tutorial.repo);
18-
return(
19-
<ahref={repoPath}>
20-
<ModeEditstyle={editStyle}/>
21-
</a>
22-
);
23-
}
24-
};
25-
exportdefaultEditPage;
13+
// class EditPage extends React.Component<{
14+
// tutorial: Tutorial.Config
15+
// }, {}> {
16+
// render() {
17+
// const { tutorial } = this.props;
18+
// if (tutorial && tutorial.edit && tutorial.repo) {
19+
// const repoPath = join(tutorial.repo, 'edit', 'master', tutorial.repo);
20+
// return (
21+
// <a href={repoPath}>
22+
// <ModeEdit style={editStyle}/>
23+
// </a>
24+
// );
25+
// }
26+
// }
27+
// };
28+
// export default EditPage;

‎src/components/Page/Hints/HintButton.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
import*asReactfrom'react';
2-
import{connect}from'react-redux';
3-
4-
import{hintPositionSet}from'../../../actions';
5-
import{hintsSelector}from'../../../selectors';
62
importFlatButtonfrom'material-ui/FlatButton';
73

84
classHintButtonextendsReact.Component<{
95
hintPosition:number,hintsLength:number,type:'next'|'prev',
106
label:string,hintPositionSet:any
117
},{}>{
12-
render(){
8+
publicrender():any{
139
const{hintPosition, hintsLength, label, type, hintPositionSet}=this.props;
1410
switch(type){
1511
case'next':
@@ -34,11 +30,5 @@ class HintButton extends React.Component<{
3430
}
3531
}
3632

37-
constmapStateToProps=state=>({
38-
hintPosition:state.hintPosition,
39-
hintsLength:hintsSelector(state).length,
40-
});
41-
42-
constmapDispatchToProps={hintPositionSet};
4333

44-
exportdefaultconnect(mapStateToProps,mapDispatchToProps)(HintButton);
34+
exportdefaultHintButton;

‎src/components/Page/Hints/index.tsx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ import HintButton from './HintButton';
77
import{Card,CardActions,CardHeader,CardText}from'material-ui/Card';
88
importHelpfrom'material-ui/svg-icons/action/help';
99

10+
import{hintPositionSet}from'../../../actions';
11+
import{hintsSelector}from'../../../selectors';
12+
1013
conststyles={
1114
position:'relative',
1215
margin:'5px auto 10px',
@@ -15,10 +18,10 @@ const styles = {
1518
};
1619

1720
classHintsextendsReact.Component<{
18-
hintsLength:number,hint:string
21+
hint:string,hintPosition:number,hintsLength:number,hintPositionSet:any,
1922
},{}>{
20-
publicrender(){
21-
const{hint}=this.props;
23+
render():any{
24+
const{hint, hintPosition, hintsLength, hintPositionSet}=this.props;
2225
if(!hint){
2326
returnnull;
2427
}
@@ -34,7 +37,7 @@ class Hints extends React.Component<{
3437
className='cr-task-hint'
3538
expandable={true}
3639
>
37-
<Markdown>{hint}</Markdown>
40+
<Markdownchildren={hint}/>
3841
</CardText>
3942
<CardActions
4043
style={{paddingBottom:'30px !important'}}
@@ -44,10 +47,16 @@ class Hints extends React.Component<{
4447
<HintButton
4548
type='prev'
4649
label='Previous'
50+
hintPosition={hintPosition}
51+
hintsLength={hintsLength}
52+
hintPositionSet={hintPositionSet}
4753
/>
4854
<HintButton
4955
type='next'
5056
label='Next'
57+
hintPosition={hintPosition}
58+
hintsLength={hintsLength}
59+
hintPositionSet={hintPositionSet}
5160
/>
5261
</CardActions>
5362
</Card>
@@ -57,6 +66,11 @@ class Hints extends React.Component<{
5766

5867
constmapStateToProps=state=>({
5968
hint:hintSelector(state),
69+
hintPosition:state.hintPosition,
70+
hintsLength:hintsSelector(state).length,
6071
});
6172

62-
exportdefaultconnect(mapStateToProps)(Hints);
73+
constmapDispatchToProps={hintPositionSet};
74+
75+
exportdefaultconnect(mapStateToProps,mapDispatchToProps)(Hints);
76+

‎src/components/common/ContentCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const ContentCard: React.StatelessComponent<{
1515
<Cardstyle={styles.card}>
1616
{title ?<CardHeadertitle={title}/> :null}
1717
<CardText>
18-
<Markdown>{content||''}</Markdown>
18+
<Markdownchildren={content||''}/>
1919
</CardText>
2020
</Card>
2121
);

‎src/typings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"jest":"registry:dt/jest#0.9.0+20160706021812",
1010
"jquery":"registry:dt/jquery#1.10.0+20160908203239",
1111
"marked":"registry:dt/marked#0.0.0+20160325085301",
12-
"material-ui":"registry:dt/material-ui#0.15.1+20160824122606",
12+
"material-ui":"registry:dt/material-ui#0.15.1+20160908103128",
1313
"mixto":"registry:dt/mixto#0.0.0+20160317120654",
1414
"node":"registry:dt/node#6.0.0+20160831021119",
1515
"pathwatcher":"registry:dt/pathwatcher#0.0.0+20160317120654",

‎src/typings/globals/atom/index.d.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,9 @@ declare namespace AtomCore {
605605

606606
mini:any;
607607

608+
getElement():any;
608609
serializeParams():{id:number;softTabs:boolean;scrollTop:number;scrollLeft:number;displayBuffer:any;};
610+
setPlaceholderText(text:string):any;
609611
deserializeParams(params:any):any;
610612
subscribeToBuffer():void;
611613
subscribeToDisplayBuffer():void;
@@ -929,10 +931,15 @@ declare namespace AtomCore {
929931
registry:any;
930932
repository:Object;
931933
scopeName:string;
934+
tokenizeLines(text:string):any;
932935
// TBD
933936

934937
}
935938

939+
interfaceIGrammars{
940+
grammarForScopeName(scope:string):IGrammar;
941+
}
942+
936943
interfaceIPane/* extends Theorist.Model */{
937944
itemForURI:(uri:string)=>IEditor;
938945
items:any[];
@@ -1081,7 +1088,7 @@ declare namespace AtomCore {
10811088
addTopPanel(options:IWorkspacePanelOptions):Panel;
10821089
addModalPanel(options:IWorkspacePanelOptions):Panel;
10831090
addOpener(opener:Function):any;
1084-
1091+
buildTextEditor():IEditor;
10851092
deserializeParams(params:any):any;
10861093
serializeParams():{paneContainer:any;fullScreen:boolean;};
10871094
eachEditor(callback:Function):void;
@@ -1286,6 +1293,7 @@ declare namespace AtomCore {
12861293
deserializers:IDeserializerManager;
12871294
config:IConfig;
12881295
commands:ICommandRegistry;
1296+
grammars:IGrammars;
12891297
keymaps:IKeymapManager;
12901298
keymap:IKeymapManager;
12911299
packages:IPackageManager;
@@ -1402,6 +1410,7 @@ declare namespace AtomCore {
14021410
}
14031411

14041412
interfaceIToken{
1413+
value:string;
14051414
// TBD
14061415
}
14071416

‎src/typings/globals/material-ui/index.d.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Generated by typings
2-
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/d0d8127eaa52ec102d65ba7c217ae948d275f8aa/material-ui/material-ui.d.ts
2+
// Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/facde8c11601788f42a373f06ad0dbf3d9e193c1/material-ui/material-ui.d.ts
33
declare module"material-ui"{
44
exportimportAppBar=__MaterialUI.AppBar;
55
exportimportAutoComplete=__MaterialUI.AutoComplete;
@@ -551,7 +551,7 @@ declare namespace __MaterialUI {
551551
errorStyle?:React.CSSProperties;
552552
errorText?:string;
553553
filter?:(searchText:string,key:string,item:AutoCompleteDataItem)=>boolean;
554-
floatingLabelText?:string;
554+
floatingLabelText?:React.ReactNode;
555555
fullWidth?:boolean;
556556
hintText?:string;
557557
listStyle?:React.CSSProperties;
@@ -752,6 +752,7 @@ declare namespace __MaterialUI {
752752

753753
interfaceCardPropsextendsReact.Props<Card>{
754754
actAsExpander?:boolean;
755+
className?:string;
755756
containerStyle?:React.CSSProperties;
756757
expandable?:boolean;
757758
expanded?:boolean;
@@ -765,6 +766,7 @@ declare namespace __MaterialUI {
765766

766767
interfaceCardActionsPropsextendsReact.Props<CardActions>{
767768
actAsExpander?:boolean;
769+
className?:string;
768770
expandable?:boolean;
769771
showExpandableButton?:boolean;
770772
style?:React.CSSProperties;
@@ -812,6 +814,7 @@ declare namespace __MaterialUI {
812814

813815
interfaceCardTextPropsextendsReact.Props<CardText>{
814816
actAsExpander?:boolean;
817+
className?:string;
815818
color?:string;
816819
expandable?:boolean;
817820
style?:React.CSSProperties;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"resolution":"main",
33
"tree": {
4-
"src":"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/d0d8127eaa52ec102d65ba7c217ae948d275f8aa/material-ui/material-ui.d.ts",
5-
"raw":"registry:dt/material-ui#0.15.1+20160824122606",
6-
"typings":"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/d0d8127eaa52ec102d65ba7c217ae948d275f8aa/material-ui/material-ui.d.ts"
4+
"src":"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/facde8c11601788f42a373f06ad0dbf3d9e193c1/material-ui/material-ui.d.ts",
5+
"raw":"registry:dt/material-ui#0.15.1+20160908103128",
6+
"typings":"https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/facde8c11601788f42a373f06ad0dbf3d9e193c1/material-ui/material-ui.d.ts"
77
}
88
}

‎src/typings/globals/react-redux/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ declare namespace ReactRedux {
4343
exportfunctionconnect():InferableComponentDecorator;
4444

4545
exportfunctionconnect<TStateProps,TDispatchProps,TOwnProps>(
46-
mapStateToProps:FuncOrSelf<MapStateToProps<TStateProps,TOwnProps>>,
46+
mapStateToProps:FuncOrSelf<MapStateToProps<TStateProps,TOwnProps>>|null,
4747
mapDispatchToProps?:FuncOrSelf<MapDispatchToPropsFunction<TDispatchProps,TOwnProps>|MapDispatchToPropsObject>
4848
):ComponentDecorator<TStateProps&TDispatchProps,TOwnProps>;
4949

5050
exportfunctionconnect<TStateProps,TDispatchProps,TOwnProps>(
51-
mapStateToProps:FuncOrSelf<MapStateToProps<TStateProps,TOwnProps>>,
51+
mapStateToProps:FuncOrSelf<MapStateToProps<TStateProps,TOwnProps>>|null,
5252
mapDispatchToProps:FuncOrSelf<MapDispatchToPropsFunction<TDispatchProps,TOwnProps>|MapDispatchToPropsObject>,
5353
mergeProps:MergeProps<TStateProps,TDispatchProps,TOwnProps>,
5454
options?:Options
@@ -57,7 +57,7 @@ declare namespace ReactRedux {
5757
typeFuncOrSelf<T>=T|(()=>T);
5858

5959
interfaceMapStateToProps<TStateProps,TOwnProps>{
60-
(state:any,ownProps?:TOwnProps):TStateProps;
60+
(state:any|null,ownProps?:TOwnProps):TStateProps;
6161
}
6262

6363
interfaceMapDispatchToPropsFunction<TDispatchProps,TOwnProps>{
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
declare module'react-router-sans-urls';

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp