Skip to content

Commit

Permalink
GH-98: Additions to react, next (#99)
Browse files Browse the repository at this point in the history
* GH-98: react useState lazy init

* GH-98: next default app, router

* minor
  • Loading branch information
dbo committed Feb 5, 2020
1 parent 06ebd1b commit eb81bef
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -10,3 +10,4 @@ yarn.lock
.DS_Store
.AppleDouble
.LSOverride
.n4js.projectstate
4 changes: 3 additions & 1 deletion npm/next/7.0/@n4jsd/next/dist/server/next.n4jsd
@@ -1,6 +1,7 @@
import {IncomingMessage} from "http";
import {ServerResponse} from "http";
import {Socket} from "net";
import {INextRouter} from "next/router";
import * as React from "react";

/**
Expand Down Expand Up @@ -67,6 +68,7 @@ export external public class ~NextPageURL {

export public interface ~NextPageProps extends React.ComponentProps {
public url?: NextPageURL;
public router?: INextRouter;
}


Expand All @@ -92,6 +94,6 @@ export external public interface ~NextApp {
public async renderToHTML(req: IncomingMessage, res: ServerResponse, pathname: string=, query: Object=): string;
}

export default external public function next(path: string, opts: ~NextAppOptions): NextApp;
export default external public function next(pathOrOpts: string|~NextAppOptions, opts: ~NextAppOptions=): NextApp;

/* -*- mode: typescript;-*- */
2 changes: 1 addition & 1 deletion npm/next/7.0/@n4jsd/next/package.json
@@ -1,6 +1,6 @@
{
"name": "@n4jsd/next",
"version": "7.0.1",
"version": "7.0.2",
"license": "EPL-1.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion npm/react/16.9/@n4jsd/react/index.n4jsd
Expand Up @@ -422,7 +422,7 @@ export external public function <PropsT extends ComponentProps> lazy(
* @see https://reactjs.org/docs/hooks-reference.html#usestate
*/
export external public function <StateT> useState(
initialState: StateT
initialState: StateT|() => StateT
): Iterable2<StateT, (state: StateT) => void>;

/**
Expand Down
4 changes: 2 additions & 2 deletions npm/react/16.9/@n4jsd/react/package.json
@@ -1,6 +1,6 @@
{
"name": "@n4jsd/react",
"version": "16.9.1",
"version": "16.9.2",
"license": "EPL-1.0",
"repository": {
"type": "git",
Expand All @@ -24,7 +24,7 @@
"n4js-runtime-es2015"
]
},
"dependencies": {
"dependencies": {
"n4js-runtime-es2015": ""
}
}

0 comments on commit eb81bef

Please sign in to comment.