mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	ts: Convert input_pill.js to TypeScript.
Migrated input_pill subsystem to TypeScript, used generics to make it a generic module so that it works with different implementations like stream_pill or user_pill.
This commit is contained in:
		@@ -161,11 +161,10 @@ run_test("copy from pill", ({mock_template}) => {
 | 
			
		||||
 | 
			
		||||
    let copied_text;
 | 
			
		||||
 | 
			
		||||
    const $pill_stub = {
 | 
			
		||||
        [0]: "<pill-stub RED>",
 | 
			
		||||
    };
 | 
			
		||||
    const $pill_stub = "<pill-stub RED>";
 | 
			
		||||
 | 
			
		||||
    const e = {
 | 
			
		||||
        currentTarget: $pill_stub,
 | 
			
		||||
        originalEvent: {
 | 
			
		||||
            clipboardData: {
 | 
			
		||||
                setData(format, text) {
 | 
			
		||||
@@ -177,8 +176,6 @@ run_test("copy from pill", ({mock_template}) => {
 | 
			
		||||
        preventDefault: noop,
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    $container.set_find_results(":focus", $pill_stub);
 | 
			
		||||
 | 
			
		||||
    copy_handler(e);
 | 
			
		||||
 | 
			
		||||
    assert.equal(copied_text, "RED");
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user