This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type FetchMachineContext = | |
| { | |
status: 'text', | |
text: string, | |
} | |
| { | |
status: 'empty' | |
} | |
export type FetchMachineEvent = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[derive(Debug)] | |
pub struct TestItem { | |
val: usize, | |
} | |
#[derive(Debug)] | |
pub struct TestItems<'a> { | |
items: &'a Vec<&'a TestItem>, | |
idx: usize, | |
pos: usize, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Signal { | |
constructor(initialValue) { | |
console.log('constuctor ' + initialValue); | |
this.value = initialValue; | |
this.listeners = []; | |
console.log(this.value); | |
console.log(this); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svg { | |
/* border: 5px orange solid; */ | |
background: darkblue; | |
} | |
.circle { | |
stroke-dasharray: 190 1000; | |
stroke-dashoffset: 0; | |
stroke-linecap: round; | |
stroke-width: 17; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://github.com/HaxeFoundation/haxe/issues/9862#issuecomment-684807345 | |
// Amazingly Safari 13 in 2020 does not support WebAudio without a prefix | |
// this abstract checks for `webkitAudioContext` if `AudioContext` is not available | |
@:forward | |
abstract AudioContext(js.html.audio.AudioContext) { | |
public inline function new(?contextOptions: js.html.audio.AudioContextOptions) { | |
if (js.Syntax.typeof(js.html.audio.AudioContext) != 'undefined') { | |
this = new js.html.audio.AudioContext(contextOptions); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./store/TestStore.js | |
import Signal from 'signals'; // yarn add signals | |
import React from 'react'; | |
export var TestStore = function() {} | |
// Set initial value here, if other than null | |
TestStore.initValue = null; | |
TestStore.value = TestStore.initValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import './App.css'; | |
// import filename from './hello.mei'; | |
import filename from './sample.musicxml'; | |
import { useEffect, useState } from 'react'; | |
function App() { | |
return ( | |
<div className="App"> | |
<VerovioView /> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import react.ReactMacro.jsx; | |
import store.TestSignals; | |
using Std; | |
@:expose('App') | |
@:native('App') | |
function App() { | |
js.Lib.require('./App.css'); | |
TestSignals.initValue = Hopp(222); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example Haxe externs for js modules |