Clauses may be classified as declarative or non-declarative in two respects: lexical/grammatical form (lafẓan) and communicative function (maʿnan). An outwardly declarative clause may convey an injunction or prohibition in its setting.
«لَا تَعْبُدُونَ إِلَّا اللَّهَ»
Do not worship anyone except Allah.
The verb has the form of a declarative expression, but the covenant context communicates an obligation and prohibition. Form alone therefore fails to explain its compatibility with a subsequent command.