customizer postMessage transport doesn’t update in javascript

in the absence of any significant official documentation for javascript in wordpress, namely the wp object
I am having hard time applying postMessage customizer controls (despite all the assurances in the theme developement handbook that it’s easy to do and all you need is to copy/paste the boilerplates)
the PHP part of my code works fine with refresh transport type, for the sake of example I will put a very minimalist code

add_action('customize_register',function ($wp_customize) {
        $wp_customize->add_section('mysection',array(
                'title' => 'section'
            )
        );
        $wp_customize->add_setting('mysetting', array(
            'transport' => 'postMessage',
            'type' => 'theme_mod'
        ));
        $wp_customize->add_control('mysetting',array(
                'section' => 'mysection'
            )
        );
    }
);
add_action('customize_preview_init',function () {
        wp_enqueue_script('random_name', get_template_directory_uri() . '/script.js', array('jquery', 'customize-preview'));
    }
);

nothing happens when I change to postMessage transport, while my JS code is as follow:

( function( $ ) {
    wp.customize( 'mysetting', function( value ) {
        value.bind( function( to ) {
            $( '#myinput' ).val( to );
        } );
    } );    
} )( jQuery );

you can guess index.php has one line: <input id="myinput"> and I checked and made sure script.js was loaded in the page.
I am getting all the changes using: wp.customize( 'mysetting').get() in the console, but I need it to automatically update the preview as it should ! without me refreshing the screen or clicking publish.
thank you for your time.