8000 Add type annotations by woxtu · Pull Request #396 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

Add type annotations #396

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

Merged
merged 4 commits into from
May 19, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add type annotations
  • Loading branch information
woxtu committed May 16, 2022
commit 2f91eb684b7dbc7f0dedbc63364fc5ed124e2c8a
4 changes: 2 additions & 2 deletions pyscriptjs/src/components/pyrepl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ mode.subscribe(value => {
currentMode = value;
});

function createCmdHandler(el) {
function createCmdHandler(el: PyRepl): StateCommand {
// Creates a codemirror cmd handler that calls the el.evaluate when an event
// triggers that specific cmd
const toggleCheckbox: StateCommand = ({ state, dispatch }) => {
Expand All @@ -41,7 +41,7 @@ function createCmdHandler(el) {
return toggleCheckbox;
}

let initialTheme;
let initialTheme: string;
function getEditorTheme(el: BaseEvalElement): string {
if (initialTheme) {
return initialTheme;
Expand Down
0