import * as React from 'react' ; import DraggableList from '../src' ; interface Item { a : number ; b : string ; } interface MyTempProps { item : Item ; itemSelected : number ; dragHandleProps : object ; } interface MyTempState { foo : number ; } class MyTemp extends React . Component < MyTempProps , MyTempState > { render ( ) { return < div { ... this . props . dragHandleProps } / > ; } } const list = [ { a : 123 , b : 'xyz' } ] ; const x = ( < DraggableList < Item , void , MyTemp > itemKey = "foo" list = { list } template = { MyTemp } onMoveEnd = { ( ignoredNewList ) => { } } />); x ; const renderedDL = null as any ; const renderedItem = renderedDL . getItemInstance ( 'foo' ) ; renderedItem as MyTemp ;