code: public static TSInterfaceType getNestedInterface(TSType type, String name, boolean create) {
  		TSModule module = getNestedTypeContainer(type, create);
  		if (module == null && !create) {
  			return null;
  		} else if (module == null) {
  			throw new IllegalStateException("cannot setup interface as no parent container is available");
  		}
  
  		for (TSElement element : module.getElements()) {
  			if (element instanceof TSInterfaceType && ((TSInterfaceType) element).getName().equals(name)) {
  				return (TSInterfaceType) element;
  			}
  		}
  		if (create) {
  			TSInterfaceType interfaceType = new TSInterfaceType();
  			interfaceType.setExported(true);
  			interfaceType.setName(name);
  			interfaceType.setParent(module);
  			module.getElements().add(interfaceType);
  			return interfaceType;
  		} else {
  			return null;
  		}
  	}
docs: Creates a nested interface for the given type (using a module with the same name as the type).